Android sdk for Intellij IDEA

馋奶兔 提交于 2019-12-07 13:11:28

问题


I'm trying to setup IntelliJ IDEA to develop android applications and I faced an issue with android sdk. As far as I know, I need to download the sdk separately. But I all I managed to find was Android command line tools which is obviously not something I need. So my question how can I get android sdk for IntelliJ IDEA?


回答1:


Same problem I have with IDEA 2017.1.1. I installed tools_r25.2.3-windows.zip and managed to install them. I've done:

  1. unzipped it to C:\Android\android_sdk\
  2. renamed "tools" folder to "tools-sdk"
  3. executed C:\Android\android_sdk\tools_inst\bin>sdkmanager --update
  4. prepared file my_file with lines:

    build-tools;24.0.0

    platforms;android-24

    tools

    emulator

  5. Executed: C:\Android\android_sdk\tools_inst\bin>sdkmanager --package_file=my_file

Then gave IntelliJ IDEA folder C:\Android\android_sdk as Android SDK Home Folder.

Then IDEA asks to install something additional. The test android project compiles and runs on emulation (AVD Manager works). I had to install 22 Platform and Build Tools though because android-24 virtual device asked for a password.

The only problem is I still have no SDK Manager with GUI interface.




回答2:


You can install whichever android SDK or API from Intellij. I have the 2018.1 version but I hope this works in earlier versions too. You can find the options to install the SDKs here:




回答3:


You can download the android SDK from this link here. I hope it should be helpful that link.




回答4:


First of all make sure you'be setup JDK properly. If not, you can download it from here. Now go to Android Developer official site and download Android Studio.

If you are already done with above mentioned points the few point you might be missing.

  • When asked to choose the JDK (not SDK) you need to choose the Java JDK which you've installed earlier. Should be under C:\Program Files\Java\jdk{version}
  • Choose a New platform ( if there's not one selected ) , the SDK platform is the android platform at C:\Program Files\Android\android-sdk-windows.

Please let me know if it didn't help.

Reference: https://www.jetbrains.com/help/idea/2017.1/getting-started-with-android-development.html




回答5:


I had the same issue. I tried downloading sdk via android eclipse setup process. Eclipse automatically downloads the sdk. This sdk has a gui sdkmanager and can be used in idea as well. Here is the link to download eclipse.




回答6:


(Android Studio installed on my computer.) As i see users missed a point while installing android SDK. You should show the Android SDK at AppData folder to IntellijIdea. C:\Users\Your_Username\AppData\Local\Android\SDK_Folder. References: https://www.jetbrains.com/help/idea/prerequisites-for-android-development.html https://www.jetbrains.com/help/img/idea/2017.2/AndroidSDKManager.png



来源:https://stackoverflow.com/questions/43448336/android-sdk-for-intellij-idea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!