Unity 3D/문제 해결

CommandInvokationFailure: Gradle build failed

Deadpool 2019. 1. 29. 21:57


CommandInvokationFailure: Gradle build failed. 

D:/Program Files/Java/jdk1.8.0_191\bin\java.exe -classpath "C:\Program Files\Unity\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'.

> Could not resolve all dependencies for configuration ':_debugApk'.

   > A problem occurred configuring project ':Firebase'.

      > No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android


* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


BUILD FAILED in 3s

]

stdout[


]

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)



해결방법 1

https://happyryu.tistory.com/138

C:\Users\[윈도우계정 폴더]\.gradle\caches


caches 폴더에 내용 삭제


해결방법 2

http://www.gamecodi.com/board/zboard-id-GAMECODI_Talkdev-no-5041-z-0.htm


유니티에서 제공하는 NDK 의 toolchains 를

Android Studio 에서 설치한 sdk/ndk-bundle/ 로 복사하거나 ndk-bundle 폴더를 삭제 



본인은 2번으로 해결됨