1. Download our Official Android App: Forums for Android!

Apps how to open and run existing project

Discussion in 'Android Development' started by aliyesami, Mar 24, 2016.

  1. aliyesami

    aliyesami Newbie
    Thread Starter
    Rank:
     #627
    Points:
    26
    Posts:
    17
    Joined:
    Mar 22, 2016

    Mar 22, 2016
    17
    1
    26
    Male
    Atmel provided me the source code of their phone app , I tried to open it in android studio but I am unable to emulate it , can some one guide me on how to do this ?
    thanks
     

    Attached Files:


    Advertisement

  2. aliyesami

    aliyesami Newbie
    Thread Starter
    Rank:
     #627
    Points:
    26
    Posts:
    17
    Joined:
    Mar 22, 2016

    Mar 22, 2016
    17
    1
    26
    Male
    also adding the .apk file provided by Atmel
     
  3. scary alien

    scary alien not really so scary
    Moderator
    Rank:
     #9
    Points:
    2,138
    Posts:
    22,282
    Joined:
    Mar 5, 2010

    Mar 5, 2010
    22,282
    23,583
    2,138
    Male
    space alien ;)
    Indy
    Hey @aliyesmi, I've moved your thread over here to our Application Development area for you.

    That .zip file does indeed look like an importable Android project, but I usually use Eclipse and I'm not at my development machine so that I could try importing it into Android Studio.

    But you'll be wanting to import it vs. opening it, so hopefully / perhaps that's the issue?

    Cheers!
     
  4. aliyesami

    aliyesami Newbie
    Thread Starter
    Rank:
     #627
    Points:
    26
    Posts:
    17
    Joined:
    Mar 22, 2016

    Mar 22, 2016
    17
    1
    26
    Male
    I tried to import it but I get the following errors :
    "Failed to sync Gradle project 'provision_ap_app'
    cause: failed to find target with hash string 'android-17 in C:\Users\user1\AppData\Loca\Android\sdk1"

    and also
    "

    Ignored Files:
    --------------
    The following files were *not* copied into the new Gradle project; you
    should evaluate whether these are still needed in your project and if
    so manually move them:

    * ic_launcher-web.png
    * proguard-project.txt
     
  5. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #17
    Points:
    1,488
    Posts:
    6,715
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    6,715
    9,446
    1,488
    Male
    Software developer
    South West of England
    Please show the contents of your build.gradle file
     
  6. aliyesami

    aliyesami Newbie
    Thread Starter
    Rank:
     #627
    Points:
    26
    Posts:
    17
    Joined:
    Mar 22, 2016

    Mar 22, 2016
    17
    1
    26
    Male
    I zipped bunch of files related to gradle including the file you wanted.
    actually the complete error I am getting is
    "
    Error:A problem occurred configuring project ':app'.
    > failed to find target with hash string 'android-17' in: C:\Users\user1\AppData\Local\Android\sdk1
    <a href="openAndroidSdkManager">Open Android SDK Manager</a>"
     

    Attached Files:

  7. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #17
    Points:
    1,488
    Posts:
    6,715
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    6,715
    9,446
    1,488
    Male
    Software developer
    South West of England
    scary alien likes this.
  8. aliyesami

    aliyesami Newbie
    Thread Starter
    Rank:
     #627
    Points:
    26
    Posts:
    17
    Joined:
    Mar 22, 2016

    Mar 22, 2016
    17
    1
    26
    Male
    I checked and the SDK path is set properly . please see the attached files
     

    Attached Files:

  9. aliyesami

    aliyesami Newbie
    Thread Starter
    Rank:
     #627
    Points:
    26
    Posts:
    17
    Joined:
    Mar 22, 2016

    Mar 22, 2016
    17
    1
    26
    Male
    the SDK information is missing from project module though . .don't know if its normal or not. but I don't know what to f ill there as the drop down list show nothing .
     

    Attached Files:

  10. aliyesami

    aliyesami Newbie
    Thread Starter
    Rank:
     #627
    Points:
    26
    Posts:
    17
    Joined:
    Mar 22, 2016

    Mar 22, 2016
    17
    1
    26
    Male
    after downloading bunch of updates by android sdk manager I can now see options in the module settings which I set as shown in picture but I still get build errors as shown in the picture.
    can you please try to import it and see if you can?
    also I have a feeling this could be a problem in the project.properties file :
    is this target version correct?

    # Project target.
    target=android-17
     

    Attached Files:

    #10 aliyesami, Mar 24, 2016
    Last edited: Mar 24, 2016
  11. aliyesami

    aliyesami Newbie
    Thread Starter
    Rank:
     #627
    Points:
    26
    Posts:
    17
    Joined:
    Mar 22, 2016

    Mar 22, 2016
    17
    1
    26
    Male
    I have good news , the build succeeded. The problem was the wrong target in the project.properties file I set it to android-23 and it worked .
    thanks for your help again . I am totally a newbie to Android programming and eager to learn
     
    scary alien likes this.
  12. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #17
    Points:
    1,488
    Posts:
    6,715
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    6,715
    9,446
    1,488
    Male
    Software developer
    South West of England
    Ah well done. Now you're getting somewhere.
     
  13. aliyesami

    aliyesami Newbie
    Thread Starter
    Rank:
     #627
    Points:
    26
    Posts:
    17
    Joined:
    Mar 22, 2016

    Mar 22, 2016
    17
    1
    26
    Male
    thanks
    I think this app is using the TCP/IP socket programming , is there any tutorial or guide available for this kind of android programming?
     

Share This Page

Loading...