Unity Android SDK 设置二三事

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

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.

”)

5. Android 平台和SDK版本关系

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)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值