AndroidStudio 报错问题

本文介绍了解决Unity中Android SDK构建失败的问题,主要原因是无法列出目标平台。解决方案包括重命名SDK中的“Tools”文件夹并替换为特定版本的工具包。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://answers.unity3d.com/questions/1320861/android-build-commandinvokationfailure-unable-to-l.html


Android build CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.



Upgrading to the latest does not work; that's what caused my problem :) They removed a feature and called it "Deprecated" without any warnings (this is not deprecation, it's removal).

The fix is to rename the "Tools" directory in the Android SDK.

Go to Unity, got to Edit->Preferences, then "External Tools"

Note where the Android SDK is located.

Go there, and rename the "Tools" folder to Tools-XXXX (replace XXX with version, or just call it Tools-Old). This is so you have a backup. You could just delete the folder.

Then, download this file:

http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip

Unzip it to the "Android SDK" location you found in the first step. Make sure it's "Tools".

Then, exit and reload Unity - build. It should work.

Also, thanks to @Vladimir-Niakhai, the MacOS version is at:

https://developer.android.com/studio/index.html

and look for "tools_r25.2.3-macosx.zip"

Credit to this thread on stack overflow: http://stackoverflow.com/questions/42538433/not-finding-android-sdk-unity and https://code.google.com/p/android/issues/detail?id=235455#makechanges


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值