当前位置:   article > 正文

Unity安装好SDK JDK 还是无法打包app 2019版本问题_failed to create a raw.ap_ package

failed to create a raw.ap_ package

安装好SDK,JDK,打爆安卓软件还是出错。出现版本小了

弹出错误 CommandInvokationFailure: Failed to create a raw.ap_ package

  1. CommandInvokationFailure: Failed to create a raw.ap_ package
  2. H:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -Xmx4096M -Dcom.android.sdkmanager.toolsdir="H:/Program Files/android-sdk-windows\tools" -Dfile.encoding=UTF8 -jar "H:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
  3. stderr[
  4. Exception in thread "main" java.lang.reflect.InvocationTargetException
  5. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  6. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  7. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  8. at java.lang.reflect.Method.invoke(Method.java:498)
  9. at SDKMain.main(SDKMain.java:136)
  10. Caused by: java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.directExecutor()Ljava/util/concurrent/Executor;
  11. at com.android.apkzlib.zip.ZFile.createSources(ZFile.java:1586)
  12. at com.android.apkzlib.zip.ZFile.makeStoredEntry(ZFile.java:1546)
  13. at com.android.apkzlib.zip.ZFile.add(ZFile.java:1625)
  14. at com.android.apkzlib.zip.ZFile.add(ZFile.java:1499)
  15. at com.android.apkzlib.sign.ManifestGenerationExtension.updateManifest(ManifestGenerationExtension.java:241)
  16. at com.android.apkzlib.sign.ManifestGenerationExtension.access$000(ManifestGenerationExtension.java:52)
  17. at com.android.apkzlib.sign.ManifestGenerationExtension$1.lambda$beforeUpdate$0(ManifestGenerationExtension.java:168)
  18. at com.android.apkzlib.zip.ZFile.notify(ZFile.java:2099)
  19. at com.android.apkzlib.zip.ZFile.update(ZFile.java:871)
  20. at com.android.apkzlib.zip.ZFile.close(ZFile.java:1161)
  21. at com.android.apkzlib.zfile.ApkZFileCreator.close(ApkZFileCreator.java:189)
  22. at UnityPackageBuilder.CreatePackage(UnityPackageBuilder.java:136)
  23. at UnityPackageBuilder.<init>(UnityPackageBuilder.java:70)
  24. at UnityPackageBuilder.main(UnityPackageBuilder.java:27)
  25. ... 5 more
  26. ]
  27. stdout[
  28. ]
  29. exit code: 1
  30. UnityEditor.Android.AndroidSDKTools.RunCommand (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, System.String workingdir, System.String errorMsg, System.Int32 memoryMB) (at <7cbc688ae1af4105929402a46c6a4414>:0)
  31. UnityEditor.Android.AndroidSDKTools.RunSDKToolWithReadLock (System.String[] command, System.String workingdir, System.String errorMsg) (at <7cbc688ae1af4105929402a46c6a4414>:0)
  32. UnityEditor.Android.PostProcessor.Tasks.AAPTPackage.CreatePackage (UnityEditor.Android.PostProcessor.PostProcessorContext context, System.String package, System.String directory, System.Boolean compress) (at <7cbc688ae1af4105929402a46c6a4414>:0)
  33. UnityEditor.Android.PostProcessor.Tasks.AAPTPackage.Pack (UnityEditor.Android.PostProcessor.PostProcessorContext context, System.String package, System.String directory, System.Boolean compress, System.Boolean useAAPT) (at <7cbc688ae1af4105929402a46c6a4414>:0)
  34. UnityEditor.Android.PostProcessor.Tasks.AAPTPackage.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <7cbc688ae1af4105929402a46c6a4414>:0)
  35. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <7cbc688ae1af4105929402a46c6a4414>:0)
  36. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

 

这个是版本跟不上结果,要么更新SDK ,要么就是unity有一个use legecy SDK tool

选上就可以了

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/118855
推荐阅读
相关标签
  

闽ICP备14008679号