Unity打安卓包遇到的问题,大家知道怎么解决吗
unity3d吧
全部回复
仅看楼主
level 6
夏哩0 楼主
百度了一段时间了,没得到解决
2018年06月20日 07点06分 1
level 6
夏哩0 楼主
CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_152\bin\java.exe -classpath "D:\Unity20180617laobanben\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.0.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"
stderr[
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'gradleOut'.
> You have not accepted the license agreements of the following SDK components:
[Android SDK Build-Tools 28].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED in 13s
]
stdout[
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to D:\Android_SDK\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
Observed package id 'build-tools;28.0.0-rc2' in inconsistent location 'D:\Android_SDK\build-tools\28.0.0-preview' (Expected 'D:\Android_SDK\build-tools\28.0.0-rc2')
Observed package id 'build-tools;28.0.0-rc2' in inconsistent location 'D:\Android_SDK\build-tools\28.0.0-preview' (Expected 'D:\Android_SDK\build-tools\28.0.0-rc2')
Observed package id 'build-tools;28.0.0-rc2' in inconsistent location 'D:\Android_SDK\build-tools\28.0.0-preview' (Expected 'D:\Android_SDK\build-tools\28.0.0-rc2')
Checking the license for package Android SDK Build-Tools 28 in D:\Android_SDK\licenses
Warning: License for package Android SDK Build-Tools 28 not accepted.
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1 progress, System.String error)
UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action`1 progress)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action`1 progress)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
2018年06月20日 07点06分 2
level 6
夏哩0 楼主
Build completed with a result of 'Failed'
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
2018年06月20日 07点06分 3
level 6
夏哩0 楼主
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0020e] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:181
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:88
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
2018年06月20日 07点06分 4
请问楼主解决这个问题了吗?能不能说一下办法啊
2018年11月20日 08点11分
@smart_graphics 无意间解决的,忘记了(ㅎ‸ㅎ)
2018年11月27日 16点11分
level 5
楼主解决了吗?我也是同样的问题
2018年07月02日 11点07分 5
我后面无意间解决了这个问题,但是不知道是不是这个方法………我把安卓SDK里面的那个sdk tool里面的一些删了,然后后面又重新下载了一遍,然后就好了
2018年08月03日 18点08分
我的unitySDK导包选择路径是非中文路径
2018年08月03日 18点08分
回复 夏哩0 :嗯嗯,我试试
2018年08月04日 00点08分
level 9
你把那个导出界面有个带gradle的选项取消掉试试,我以前也是这个问题,后来勾掉就好了。
2018年07月03日 09点07分 6
我那时候试过了,不是这个问题,蟹蟹了
2018年08月03日 18点08分
level 4
把Build System从gradle换成Internal试试
2018年07月04日 08点07分 7
不是这个问题,谢谢了
2018年08月03日 18点08分
请问Build System 这个面板是怎么添加上去的?
2020年01月20日 07点01分
level 1
2018年07月28日 06点07分 8
level 7
这个我知道什么问题,求骚扰:前三位483中间795后三位848
2018年07月28日 08点07分 9
level 10
所有脚本里面检查有没有Editor引用,有的话全删了
2018年08月04日 04点08分 10
哈哈哈,谢谢了
2018年08月05日 08点08分
@夏哩0 楼主,这样解决了吗?
2018年11月21日 06点11分
同问呀
2019年04月03日 13点04分
求怎么解决的
2019年04月19日 03点04分
level 1
请问楼主解决问题了吗?求解方法a
2018年11月20日 07点11分 11
level 2
请问楼主解决了吗,我也遇到同样的问题,百度了好久没查到
2019年04月19日 05点04分 12
请问你,解决了么,我现在也出现了这种问题,就是找不到解决方法
2020年05月31日 12点05分
level 3
源文件不要有中文路径!
2019年05月18日 01点05分 13
正解!!!!!!!!
2019年12月28日 05点12分
对的!!!!
2020年01月04日 04点01分
楼主根本不是因为这个问题造成的
2020年07月30日 15点07分
level 1
楼主,我今天也遇到了,怎么解决啊?? 加个QQ聊吧
2019年07月03日 07点07分 14
ñ你好,这个问题解决了吗,我也遇到了
2019年07月09日 14点07分
level 10
这个换一下你的tools,有的tools的gradle编译不过。这个问题都比较低级了。接触游戏开发多了,多接触哈Androidstudio和jdk的编译和gradle的构建原理。你就会觉得这些bug都不是事。
2019年07月10日 05点07分 15
我觉得你这个不是根本原因,别人跟我同样的tools,照样可以用gradle build,但是我就不行,已经block 2天了。 各种证书缺失
2020年03月09日 17点03分
打空包和不接SDK都可以正常打包,就是加了渠道SDK后出现了这个bug
2019年10月16日 03点10分
@vb2250158 主要是jdk编译不过你的SDK,你去下载一个不同版本的tools,然后去替换了重新打包尝试一下。或者更换jdk版本。
2019年10月17日 02点10分
1 2 尾页