Unity We recommend using a newer Android Gradle plugin to use compileSdk = 33问题

这两天碰到一个unity导出APK问题,我的Unity版本式2022.3.17LTS,导入过程种发生错误如下:

Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 33

This Android Gradle plugin (7.1.2) was tested up to compileSdk = 32

试过升级Android Studio的gradle,或者SDK也不行,经过两天的折腾,找各种资料最终问题还是得到了解决.

a、Uinty,Edit->Preference->External Tools,找到SDK,然后copy path,

b、打开我的电脑,粘贴路径,会跳转到Unity的Sdk里面,打开Platform,发现里面只有android31,32两个Level。

c、打开Android Studio,File->Setting->Languages&Frameworks->Android SDK,右边勾上比32Level更高的,我选择34,然后右下角APPLY,Ok。等待下载完成

d、找到Android Studio的Sdk安装位置,然后选择Platform里 android 34,Build-tools的34.0.0,分别复制粘贴到Unity 的SDK的Platform与Build-tools下

e,重新打开Unity,再导出问题搞定。

猜你喜欢

转载自blog.csdn.net/2401_84121183/article/details/137933969