我想为Android构建一个新项目并输出它,但是我无法将其构建为像错误一样的图像。
1
CommandInvokationFailure:无法创建资产。ap包C:\ Program Files \ Unity \ Editor \ Data \ PlaybackEngines \ AndroidPlayer / Tools \ OpenJDK \ Windows \ bin \ java.exe -Xmx4096M -Dcom.android.sdkmanager.toolsdir =“ C:/ Android / android-sdk \ tools” -Dfile.encoding = UTF8 -jar“ C:\ Program Files \ Unity \ Editor \ Data \ PlaybackEngines \ AndroidPlayer / Tools \ sdktools.jar”-stderr [线程异常sun.reflect.NativeMethodAccessorImpl.invoke0(本地方法)处的“ main” java.lang.reflect.InvocationTargetException 43),位于SDKMain.main(SDKMain.java:136)处的java.lang.reflect.Method.invoke(Method.java:498)造成原因:java.lang.NoSuchMethodError:com.google.common.util.concurrent.MoreExecutors .directExecutor()Ljava / util / concurrent / Executor;在com.android.apkzlib.zip.ZFile.createSources(ZFile.java:1586)在com.android.apkzlib.zip.ZFile.makeStoredEntry(ZFile.java:1546)在com.android.apkzlib.zip.ZFile.add (ZFile.java:1625)在com.android.apkzlib.zfile.ApkZFileCreator.writeFile(ApkZFileCreator.java:158)在UnityPackageBuilder.addDir(UnityPackageBuilder.java:89)在UnityPackageBuilder.addDir(UnityPackageBuilder.java:83)在UnityPackageBuilder .UnitdPackageBuilder.main.UnityPackageBuilder.main(UnityPackageBuilder.java:70)的.addDir(UnityPackageBuilder.java:83),UnityPackageBuilder.main(UnityPackageBuilder.java:70)的CreatePackage(UnityPackageBuilder.java:132)... 5 [更多] stdout []退出代码:1 UnityEditor.Android.AndroidSDKTools.RunCommand(System.String javaExe,System.String sdkToolsDir,System.String [] sdkToolCommand,System.String workingdir,System.String errorMsg,System.Int32 memoryMB)(在:0处)UnityEditor .Android.AndroidSDKTools.RunSDKToolWithReadLock(System.String []命令,System.String workingdir,System.String errorMsg) (0处)UnityEditor.Android.PostProcessor.Tasks.AAPTPackage.CreatePackage(UnityEditor.Android.PostProcessor.PostProcessorContext上下文,System.String包,System.String目录,System.Boolean压缩)(0处)UnityEditor.Android。 PostProcessor.Tasks.AAPTPackage.Pack(UnityEditor.Android.PostProcessor.PostProcessorContext上下文,System.String包,System.String目录,System.Boolean压缩,System.Boolean useAAPT)(为:0)UnityEditor.Android.PostProcessor.Tasks。 AAPTPackage.Execute(UnityEditor.Android.PostProcessor.PostProcessorContext上下文)(在:0)UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks(UnityEditor.Android.PostProcessor.PostProcessorContext上下文)(在:0)UnityEngine.GUIUtility:ProcessEvent(Int32,
2
构建完成,结果为UnityEngine.GUIUtility:ProcessEvent(Int32,IntPtr)失败
3
UnityEditor.BuildPlayerWindow + BuildMethodException:UnityEditor.BuildPlayerWindow + DefaultBuildMethods.BuildPlayer出现2个错误(UnityEditor.BuildPlayerOptions选项)[0x00234]在C:\ buildslave \ unity \ build \ Editor \ Mono \ BuildPlayerWindowBuildMethods.cs:190处出现。 C:\ buildslave \ unity \ build \ Editor \ Mono \ BuildPlayerWindowBuildMethods.cs:96 UnityEngine.GUIUtility:ProcessEvent(Int32,IntPtr)
中的BuildPlayerWindow.CallBuildMethods(System.Boolean askForBuildLocation,UnityEditor.BuildOptions defaultBuildOptions)[0x0007f]
答案 0 :(得分:1)
在“构建设置”中,将“构建系统”设置为“内部(不建议使用)”,然后单击“播放器设置”。在检查器中,转到“发布设置”部分,然后选中“使用旧版SDK工具”复选框。