S
S
Sergey Panov2018-06-02 18:24:53
Java
Sergey Panov, 2018-06-02 18:24:53

Why is the project not being built on Android?

Good day, friends. I'm trying to build a project in Unity for the Android platform. Everything was fine, but now I started building the project and an error occurs


CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_171\bin\java.exe -classpath "C:\Programs\Unity 3D\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'.
> Failed to find Build Tools revision 28.0.0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED in 22s
]
stdout[
Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons could not be reused, use --status for details
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 C:\Users\dword\AppData\Local\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.
File C:\Users\dword\.android\repositories.cfg could not be loaded.
]
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)

Never had this before and never experienced it. Please tell me how to solve?
Thank you very much in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2018-06-02
@sergey-gornostaev

Create an empty file C:\Users\dword\.android\repositories.cfg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question