简体   繁体   English

我无法在 apk 文件中构建它给出了一个错误

[英]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

enter image description here在此处输入图像描述

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.

相关问题 无法在 Flutter 中构建 APK 文件 - Can't build APK file in Flutter 为什么我不能建立APK不AAR? - why i can't build apk not aar? 由于 gradle 错误,无法使用 Qt Creator 构建 APK - Can't build APK using Qt Creator due to gradle error 为什么我不能使用 KivyMD 为 android 构建 apk? - Why can’t I build an apk for android using KivyMD? 我无法构建 Flutter apk,因为访问“FlutterEngine”class - I can't build a Flutter apk because access 'FlutterEngine' class 我在android studio中制作Build apk时发生Gradle错误,但能够在无法通过Build Apk生成apk文件的设备上运行 - Gradle error when i make a Build Apk in android studio, but am able to run on devices not able to generate apk file through Build Apk 如何使用MoSync Reload构建APK文件? - How can I build an APK file using MoSync Reload? 如何解决“flutter build apk”上的此错误 - How can I solve this error on "flutter build apk" 当我尝试在android studio 3上构建apk时,它给了我错误 - When i try to build apk(s) on android studio 3 it gives me error 使用 ReactNative 构建的 APK 无法替换为使用 Android Studio 构建的 APK - APK build with ReactNative Can't be Replaced with APK build with Android Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM