How do I install the standalone Android SDK and then add it to IntelliJ IDEA on Windows?

后端 未结 3 1318
执笔经年
执笔经年 2020-12-06 04:06

This is the webpage showing from where I downloaded the SDK:

\"This

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-06 04:28

    In IntelliJ IDEA 2017.1 and 2017.2 setting up Android SDK from scratch is complicated. I would recommended to install Android Studio and manage SDK platform there. This problem will be addressed in one of the nearest updates.

    If you are brave enough, it's still possible to set it up without Android Studio using the tools\bin\sdkmanager.bat command line tool. GUI version of the SDK Manager is deprecated (no longer available in the SDK download). Standalone SDK can be downloaded here. Look below the Get just the command line tools section.

    So, you will need to install at least one platform version.

    First run the update to ensure you have the latest tools:

    sdkmanager --update
    

    Now you can list the packages available for installation:

    sdkmanager --list
    

    To install Android Platform:

    sdkmanager platforms;android-26
    

    To install the current build tools version (optional):

    sdkmanager build-tools;26.0.0

    At this point you should be able to add Android SDK configuration for the installed platform version in IntelliJ IDEA like this:

    You will also have access to Android SDK configuration UI where you download additional components and perform updates (just like in Android Studio):

提交回复
热议问题