How do you add an SDK to Android Studio?

前端 未结 8 1500
别那么骄傲
别那么骄傲 2020-12-24 05:07

I\'m using Google\'s Android Studio 0.1 based on IntelliJ, and I cannot figure out how to add additional SDKs to my project.

I exported my existing project from Ecli

相关标签:
8条回答
  • 2020-12-24 05:46

    I had opened a ticket also with Google's support, and received the solution. Instead of choosing the sdk/platform/android-16 folder, if you select the top-level "sdk" folder instead, you'll then be asked to choose which SDK you want to add. This worked!

    enter image description here

    enter image description here

    0 讨论(0)
  • 2020-12-24 05:49

    For those starting with an existing IDEA installation (IDEA 15 in my case) to which they're adding the Android SDK (and not starting formally speaking with Android Studio), ...

    Download (just) the SDK to your filesystem (somewhere convenient to you; it doesn't matter where).

    When creating your first project and you get to the Project SDK: bit (or adding the Android SDK ahead of time as you wish), navigate (New) to the root of what you exploded into the filesystem as suggested by some of the other answers here.

    At that point you'll get a tiny dialog to confirm with:

    Java SDK:     1.7            (e.g.)
    Build target: Android 6.0    (e.g.)
    

    You can click OK whereupon you'll see what you did as an option in the Project SDK: drop-down, e.g.:

    Android API 23 Platform (java version "1.7.0_67")
    
    0 讨论(0)
  • 2020-12-24 05:55

    You have to put your SDK's in a given directory or .app directory. You have to do it in finder while you are out of the application i'm assuming, but personally I'd use terminal in Mac instead of doing it in the App itself or finder. According to Google:

    On Windows and Mac, the individual tools and other SDK packages are saved within the Android Studio application directory. To access the tools directly, use a terminal to navigate into the application and locate the sdk/ directory. For example:

     Windows: \Users\<user>\AppData\Local\Android\android-studio\sdk\
     Mac: /Applications/Android\ Studio.app/sdk/
    
    0 讨论(0)
  • 2020-12-24 05:55

    Download your sdk file, go to Android studio: File->New->Import Module

    0 讨论(0)
  • 2020-12-24 05:56

    I had to restart Android Studio for changing the sdk after installing a new one. Then Android Studio asked me for configuring my SDK and let me do it.

    0 讨论(0)
  • 2020-12-24 05:58

    You can change from the "build.gradle" file the line:

    compileSdkVersion 18
    

    to the sdk that you want to be used.

    0 讨论(0)
提交回复
热议问题