Unity Admob CommandInvokationFailure error solution

2017. 3. 30. 09:34Korean/개발백과사전


How to solve CommandInvokationFailure error in Unity


CommandInvokationFailure: Gradle build failed. 


C:\Program Files\Java\jdk1.8.0_92\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-2.14.jar" 


org.gradle.launcher.GradleMain "assembleRelease" stderr[ FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':GoogleMobileAdsPlugin'. > Could not open cp_proj remapped class cache for a3z4zdl5fcobdida8j688jy8w (C:\Users\Jiseob.RYU\.gradle\caches\2.14\scripts-remapped\build_3jmypqtfkm6e3lteukob7oq4o\a3z4zdl5fcobdida8j688jy8w\cp_proj57408229). > Unexpected lock protocol found in lock file. Expected 3, found 0. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. ] stdout[ BUILD FAILED Total time: 2.254 secs ] exit code: 1 UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.GradleWrapper.RunJava (System.String args, System.String workingdir, UnityEditor.Android.Progress progress) UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, UnityEditor.Android.Progress progress) UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.HostView:OnGUI()



Solution is that,


Go to below path and delete all files under caches.


C:\Users\[Your Name]\.gradle\caches



Then restart Unity and compile


Cheers.