gpt4 book ai didi

java - Unity Daydream APK构建失败

转载 作者:行者123 更新时间:2023-12-03 05:39:46 25 4
gpt4 key购买 nike

我无法使用Unity 2018.2.17f1来构建GoogleVRForUnity.unitypackage项目。当我尝试构建时,出现错误消息:

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)

另外2个错误:
Build completed with a result of 'Failed'
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

和:
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)

如果有人知道发生了什么,我将不胜感激。

最佳答案

  • 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.



  • 如果您仔细查看这行代码“C:\ Users \ samu- \ Desktop \ Capacitacin nxito-copia \ Temp \ gradleOut \ build.gradle”,则您的路径具有某种ASCII符号,因此在构建时会失败它。

    更改路径或将其命名为没有ASCII的名称,然后尝试重建它。似乎它无法解密ASCII字符并引发错误。确保仅将英文字符用于构建路径。

    这是 link中提到的报价,您的错误有:

    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".



    请检查此可能重复项以获取更多 information

关于java - Unity Daydream APK构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53810126/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com