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

"Please select Android SDK" - newbie question

Discussion in 'Android Development' started by MattNor, Aug 29, 2017.

  1. MattNor

    MattNor Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    8
    Joined:
    Aug 29, 2017

    Aug 29, 2017
    8
    0
    5
    I am a new user to Android Studio, so this may be a simple question. I have searched around, and found a couple tips, but nothing that worked...

    I have a zip packed from Udacity that I am trying to open/run in Android Studio. The package is here - https://d17h27t6h515a5.cloudfront.n...id/firebase-analytics-green-thumb-android.zip

    I have no instructions as to how to get this into Android Studio. Left to my own devices, I am currently stuck at a place where, if I try to run the app, I get an error saying "Please select Android SDK.

    I have checked everywhere for a solution to this, and the only two things I've found were:

    1. Making sure the path to my Android SDK folder is correct within Android Studio settings (it is)
    2. Making sure the same path is matched in the project local.properties file (it is)
    The fact that these are both set properly (I think) leads me to believe that I just did the whole import wrong and should start from scratch. But I don't really know what to do with that zip file to get it (properly) into Android Studio.

    Initially I just went to File > Open and then selected the project build.gradle file from the zip package. Was that even the right thing to get this started?

    Thank you in advance for any help that can be offered! :)

     

    Advertisement

  2. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,450
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,450
    10,736
    1,988
    Male
    Software developer
    South West of England
    I'll have a go at importing this project and give you a step-by-step guide. Haven't got time now so it will be tomorrow.
     
  3. MattNor

    MattNor Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    8
    Joined:
    Aug 29, 2017

    Aug 29, 2017
    8
    0
    5
    Thank you SO much! :-D You have no idea what a help that would be...I am in a pinch to get this completed, and am feeling pretty helpless with it.
     
  4. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,450
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,450
    10,736
    1,988
    Male
    Software developer
    South West of England
    I've successfully imported your project. Here's how I did it:

    1. Unzip your project zip file to a local directory
    2. In AS select New -> Import project, and navigate to the folder where you unzipped the project

    At this point I got an error shown "Please configure Android SDK". This is because I didn't have the SDK for Nougat. I just clicked on the link given in the Logcat window, and AS proceeded to download the 25.0.2 SDK. After this it went ahead and built the project.
     
    MattNor likes this.
  5. MattNor

    MattNor Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    8
    Joined:
    Aug 29, 2017

    Aug 29, 2017
    8
    0
    5
    Thank you for the help. Here's where I'm kind of stuck and things aren't doing for me what they seemed to do for you...

    When I open AS and import the project, I don't get any errors, but the little green arrow to run the app is grayed-out.

    So, I went to Run > Run (from the Run menu, I was able to select that, for some reason...or Alt + Shift + F10...same thing), and then a little tiny box pops up that only has a clickable Edit Configurations button/link (the title of the tiny popup box is Run, and at the bottom it says Hold shift to debug).

    If I click that Edit Configurations link, a new window pops up titled Run/Debug Configurations. That window is divided into two sections...the left side has an expandable menu labeled Default in it (when expanded, there are several options..."Android App", "Android Instrument Tests", "Android JUnit", etc). The right side is blank and has the message Press the + button to create a new configuration based on default settings.

    Did I do something wrong during the import? If not, where should I go from here?

    Thanks again for any help you can offer! :)
     
  6. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,450
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,450
    10,736
    1,988
    Male
    Software developer
    South West of England
    Stop there. Everything is greyed out because your project doesn't build. Nothing will deploy or run until the build has been successful.
    If you look in the Logcat view, it should tell you what the problem is.
     
    MattNor likes this.
  7. MattNor

    MattNor Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    8
    Joined:
    Aug 29, 2017

    Aug 29, 2017
    8
    0
    5
    This follow-up will probably be indicative of just HOW MUCH of a newbie I am, but...what's the Logcat view? :p

    I'm guessing it's that Event Log section at the bottom? And if so, I only have one message in there:

    8:24 AM Gradle sync started

    8:24 AM Gradle sync completed
    Am I just looking in the wrong place?
     
  8. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,450
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,450
    10,736
    1,988
    Male
    Software developer
    South West of England
    Hit Alt+6 to display the Android Monitor view. One of the tabs there is called 'logcat'. It's probably *the* most informative screen you can look at in AS.
     
  9. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,450
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,450
    10,736
    1,988
    Male
    Software developer
    South West of England
    Or choose View -> Tool Windows -> Android Monitor from the top menu.
     
  10. MattNor

    MattNor Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    8
    Joined:
    Aug 29, 2017

    Aug 29, 2017
    8
    0
    5
    Seemed simple enough, right? Well it wasn't working. Nothing happened with Alt+6.

    Not wanting to bother you needlessly, I started googling around. Everyone said what you did...super easy...just hit Alt+6.

    Then I found a link that said to make sure something was enabled under Tools > Android. Well, it turns out I don't have an Android menu under Tools!

    I loaded up a different AS project (one that was working), and noticed that project did have the Android menu. On that same project, Alt+6 opened up that logcat window, no problem!

    So, it looks like I have a new problem...how do I get that Android menu under Tools for this project (seemingly, then, allowing me to use the Alt+6 command to open logcat)?

    I found this thread, but I feel like this imported project that I'm trying to get working has all the things in the build.gradle files that it says it should:

    https://stackoverflow.com/questions/44293791/tools-android-menu-doesnt-exist-in-android-studio
     
  11. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,450
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,450
    10,736
    1,988
    Male
    Software developer
    South West of England
    Jesus this is like pulling teeth ;)
    Why not import the new project using the AS project that is working? It should ask you if you would like to replace the existing project, or open up a new window for it.
     
  12. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,450
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,450
    10,736
    1,988
    Male
    Software developer
    South West of England
    BTW you're looking under the wrong menu item. Read post #9. It's

    View -> Tool Windows -> Android Monitor
     
  13. MattNor

    MattNor Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    8
    Joined:
    Aug 29, 2017

    Aug 29, 2017
    8
    0
    5
    Dude, you aren't kidding! :p

    Your suggestion didn't seem to work (importing and overwriting the window). In panic mode (at risk of continuing to pester you!), I just started copying/pasting various elements from my working project into the non-working one. I don't know what sort of "frankenstein-ing" I did (and I'm sure there's tons of junk in this new project that doesn't need to be there), but the overkill seemed to work, and the menu appeared!

    The project now runs, which is enough to get me through this course I'm taking.

    THANK YOU! (for both your assistance and your patience!)
     
  14. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,450
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,450
    10,736
    1,988
    Male
    Software developer
    South West of England
    Well great that it's working but I'm still unclear on why you don't have the Logcat view available. As I said, all I did was just click on the link shown in that view, and AS sorted the whole thing out. It's usually very clever in resolving problems like that.
     
  15. MattNor

    MattNor Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    8
    Joined:
    Aug 29, 2017

    Aug 29, 2017
    8
    0
    5
    Allow me to clarify...

    ...After my "frankenstein-ing", that's when that Tools > Android menu finally appeared. And then after that Tools > Android menu finally appeared, that's when I was able to hit Alt+6 to get the logcat menu.

    A ton of errors came up in logcat, but (again) I got this sample project working enough to get me through this course I'm doing, so...whatever. :p

    And the other good thing is that when I started a new project from scratch (not the sample project import), all the menus were there, as was logcat. So, I'm hoping that if I continue with Android development I will not have these issues for future/new projects, and that they were only isolated to this sample download/project I was importing. :)
     

Share This Page

Loading...