- Home /
Getting this error when trying to run a game on android
(sdk=https://developer.android.com/studio/---Windows)(jdk=version---1.8.0)(Unity Version----2018.2.6f1)
Errors are: 1:CommandInvokationFailure: Gradle build failed. C:/Program Files/Java/jdk1.8.0_191\bin\java.exe -classpath "D:\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.2.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"
stderr[
FAILURE: Build failed with an exception.
-
Could not resolve all files for configuration ':classpath'. Could not find intellij-core.jar (com.android.tools.external.com-intellij:intellij-core:26.0.1).
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 37s ] stdout[ Starting a Gradle Daemon (subsequent builds will be faster) ] 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 (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1 progress) Rethrow as GradleInvokationException: Gradle build failed UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, 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)
2:UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0021f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:187 at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:94 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
THANKS A LOT IF YOU HELP!!! ANY HELP IS APPRECIATED
Answer by Sullivam007 · Oct 25, 2018 at 12:53 PM
Try this:
More info:
https://stackoverflow.com/questions/52946371/android-studio-could-not-find-intellij-core-jar
Hi, Thanks a lot for a quick reply
I did the steps but now I get this error CommandInvokationFailure: Unable to install AP$$anonymous$$ to device. Please make sure the Android SD$$anonymous$$ is installed and is properly configured in the Editor. See the Console for more details. D:/ANDROID_SD$$anonymous$$\platform-tools\adb.exe -s "13cbda3c9804" install -r "C:\Users\manas\OneDrive\Documents\Seesaw\SeeSaw_android1.apk"
stderr[ adb: failed to install C:\Users\manas\OneDrive\Documents\Seesaw\SeeSaw_android1.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE] ]
If you want I can give you the whole error!! Anyways thanks a lot and I hope we can solve this problem ASAP
Answer by Bynar1M4n · Oct 25, 2018 at 01:05 PM
Try actualize your jdk. If this not solve the problem, try actualize the android versions in the sdk manager.
Can you please explain how do I actualize my jdk or android versions Thanks
Yes, this link explained how do that. https://docs.unity3d.com/$$anonymous$$anual/android-sdksetup.html