1.Unity新版本默认编辑器里不能设置AndroidSDK路径;“Preference/ExternalTools”下无Android选项;
2.需要在Unity Hub里,找到对应Unity版本,选择安装模块“Android Build Support”,SDK/NDK,OpenJDK可以不选,后面在编辑器里自定义;
3. 在Unity里自定义,需要取消默认自定义覆盖;
4.使用android command line tools 中的SDKmanager安装Android sdk
1)下载SDK :
sdkmanager.bat --install --sdk_root="D:\Android\SDK" platforms;android-29
2) 下载NDK
(commandlinetools里的sdkmanager好像不能下载ndk,见https://stackoverflow.com/questions/41471000/how-to-install-ndk-with-android-sdk-manager/41487078;“
The android's standalone sdk manager [second picture] differs from the one integrated in Android Studio[first picture]. The standalone has the basics for android developing whereas the Android Studio's integrated sdk manager, located in Tools > Android > SDK Manager, adds more useful tools, such as the ndk, Cmake* and LLDB* [* in android studio 222 version] (the ones highlighted).
So you have two options, if you are using Android Studio, using the integrated sdk manager to directly install the ndk or you could manually download the ndk and add the path to your system variables so your build environment is aware of it.
”)
Android 10(API 级别 29)
Android 9(API 级别 28)
Android 8.1(API 级别 27)
Android 8.0(API 级别 26)
Android 7.1(API 级别 25)
Android 7.0(API 级别 24)
Android 6.0(API 级别 23)
Android 5.1(API 级别 22)
Android 5.0(API 级别 21)
Android 4.4W(API 级别 20)
Android 4.4(API 级别 19)