0

I am unable to get the GoogleVRForUnity.unitypackage project to build using either Unity 2018.2.17f1. When I try to build, I get an error saying:

CommandInvokationFailure: Gradle build failed. 
C:/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.2.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

 stderr[

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\samu-\Desktop\Capacitaci�n �xito - copia\Temp\gradleOut\build.gradle' line: 22

* What went wrong:
A problem occurred evaluating root project 'gradleOut'.
> Failed to apply plugin [id 'com.android.application']
   Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/95744 for details. This warning can be disabled by adding the line 'android.overridePathCheck=true' to gradle.properties file in the project directory.

* 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 21s
]
stdout[
Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details
Download https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/intellij-core/26.0.1/intellij-core-26.0.1.jar
]
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)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

This other 2 errors:

Build completed with a result of 'Failed'
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

And:

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)

If anyone knows what is happening, I would appreciate any help with this problem

1 Answers1

0
  • Where: Build file 'C:\Users\samu-\Desktop\Capacitaci�n �xito - copia\Temp\gradleOut\build.gradle' line: 22

  • What went wrong: A problem occurred evaluating root project 'gradleOut'.

    Failed to apply plugin [id 'com.android.application'] Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/95744 for details. This warning can be disabled by adding the line 'android.overridePathCheck=true' to gradle.properties file in the project directory.

If you look closely on this line "C:\Users\samu-\Desktop\ Capacitaci�n �xito - copia\Temp\gradleOut\build.gradle" your path has some kind of ASCII symbols which makes it fail while building it.

Change the path or name it to something which does not have ASCII and try rebuilding it. It seems its not able to decipher the ASCII character and its throwing the error. Make sure to use english characters only for the build path.

This is a quote mentioned in the link which your error has :

To expand a little bit on the previous answer: the Java launcher doesn't use the Unicode-aware (wide-char) Windows APIs, so command line arguments go through a lossy conversion. Looking at what happens to the name "réseaux": - é is U+00E9 ("latin small letter e with acute"), whose UTF-8 encoding is "c3 a9" - the Java launcher (in dx), unaware of this encoding, will interpret it as two bytes, where à is c3 and © is a9 (plausible in Latin-1), resulting in "réseaux".


Do check this possible duplicate for more information.

killer_mech
  • 1,568
  • 13
  • 26