sdk和jdk路径都已经链接好了jdk的版本是9.0.1console里面显示的是CommandInvokationFailure: Failed to build apk./Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/star/Library/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -stderr[Exception in thread "main" java.lang.reflect.InvocationTargetExceptionat 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/BASE64Encoderat com.android.sdklib.internal.build.SignedJarBuilder.<init>(SignedJarBuilder.java:177)at com.android.sdklib.build.ApkBuilder.init(ApkBuilder.java:446)at com.android.sdklib.build.ApkBuilder.<init>(ApkBuilder.java:422)at com.android.sdklib.build.ApkBuilder.<init>(ApkBuilder.java:362)at UnityApkBuilder.<init>(UnityApkBuilder.java:214)at UnityApkBuilder.main(UnityApkBuilder.java:34)... 5 moreCaused by: java.lang.ClassNotFoundException: sun.misc.BASE64Encoderat 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: 1UnityEditor.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()请问是jdk版本的问题吗?要怎么解决?unity更新以后困扰我很久了
添加回答
举报
0/150
提交
取消