[英]I can’t build in the apk file it gives an error
I can't build in the apk file, it gives an error, help fix it.我无法在apk文件中构建,它给出了一个错误,帮助修复它。
I will show you the error and screenshots我会告诉你错误和截图
Error building Player: CommandInvokationFailure: Unable to list target platforms.构建播放器时出错:CommandInvokationFailure:无法列出目标平台。 Please make sure the android sdk path is correct.请确保 android sdk 路径正确。 See the Console for more details.有关更多详细信息,请参阅控制台。 C:/Program Files (x86)/Java/jdk-14.0.1\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/Sanchek19/AppData/Local/Android/Sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" C:/Program Files (x86)/Java/jdk-14.0.1\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/Sanchek19/Android/App " -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar"
stderr[标准错误[
Error:Invalid command android错误:无效命令 android
] ]
stdout[标准输出[
] ]
exit code: 64退出代码:64
This sounds like exactly the same issue described here: https://answers.unity.com/questions/1343613/need-help-asap-building-apk-file-error-commandinvo.html这听起来与此处描述的完全相同的问题: https://answers.unity.com/questions/1343613/need-help-asap-building-apk-file-error-commandinvo.html
I was also able to encounter this error in the past - using older Android Build Tools should help, just like the described 25.2.5
.我过去也遇到过这个错误——使用旧的 Android 构建工具应该会有所帮助,就像描述的25.2.5
一样。 Google deprecated the android
command in meantime, so that it returnes 64 result code. Google 同时弃用了android
命令,使其返回 64 个结果代码。
Out of curiosity, what is your Unity version?出于好奇,您的 Unity 版本是什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.