error: failed to find java.exe._【求助大神】帮忙解决apk发布问题

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

错误1

CommandInvokationFailure: Failed to build apk.

C:/Program Files/Java/jdk-9\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:\Users\steri\AppData\Local\Android\sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

stderr[

Exception in thread "main" java.lang.reflect.InvocationTargetException

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:564)

at SDKMain.main(SDKMain.java:130)

Caused by: java.lang.NoClassDefFoundError: sun/misc/BASE64Encoder

at com.android.sdklib.internal.build.SignedJarBuilder.(SignedJarBuilder.java:177)

at com.android.sdklib.build.ApkBuilder.init(ApkBuilder.java:446)

at com.android.sdklib.build.ApkBuilder.(ApkBuilder.java:422)

at com.android.sdklib.build.ApkBuilder.(ApkBuilder.java:362)

at UnityApkBuilder.(UnityApkBuilder.java:214)

at UnityApkBuilder.main(UnityApkBuilder.java:34)

... 5 more

Caused by: java.lang.ClassNotFoundException: sun.misc.BASE64Encoder

at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)

... 11 more

]

stdout[

]

exit code: 1

UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)

UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)

UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)

UnityEditor.HostView:OnGUI()

错误2

UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.

at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x001b9] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:162

at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83

UnityEditor.HostView:OnGUI()

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值