Hi everyone,
I try to build my android project to do some test with google admob but it does not want to be built.
I have check Custom Main Gradle Template and Custom Gradle Properties Template.
I don’t know what to do to build this project
I have 3 errors message :
message 1
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Message 2
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Projet Unity\TestPub\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':launcher'.
> Failed to apply plugin 'com.android.internal.application'.
> Cannot parse project property android.enableR8='' of type 'class java.lang.String' as boolean. Expected 'true' or 'false'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Message 3
CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\2022.3.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2022.3.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-7.2.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
Environment Variables:
PROCESSOR_ARCHITECTURE = AMD64
JAVA_HOME = C:\Program Files\Java\jdk-22
DriverData = C:\Windows\System32\Drivers\DriverData
USERDOMAIN = DESKTOP-RV65C5B
BLENDER_PATH = C:\Program Files\Blender Foundation\Blender 4.0\blender.exe
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
COMPUTERNAME = DESKTOP-RV65C5B
DEBUG_ENV_VAR = UnityHub
LOGONSERVER = \\DESKTOP-RV65C5B
ProgramData = C:\ProgramData
SESSIONNAME = Console
USERPROFILE = C:\Users\gogma
ALLUSERSPROFILE = C:\ProgramData
SystemRoot = C:\Windows
windir = C:\Windows
ProgramFiles(x86) = C:\Program Files (x86)
ProgramW6432 = C:\Program Files
OS = Windows_NT
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 183 Stepping 1, GenuineIntel
HOMEPATH = \Users\gogma
FPS_BROWSER_USER_PROFILE_STRING = Default
PROCESSOR_LEVEL = 6
JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF-8
CommonProgramFiles = C:\Program Files\Common Files
PUBLIC = C:\Users\Public
USERDOMAIN_ROAMINGPROFILE = DESKTOP-RV65C5B
TEMP = C:\Users\gogma\AppData\Local\Temp
ProgramFiles = C:\Program Files
CommonProgramW6432 = C:\Program Files\Common Files
HOMEDRIVE = C:
USERNAME = gogma
OneDrive = C:\Users\gogma\OneDrive
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
NUMBER_OF_PROCESSORS = 20
ComSpec = C:\Windows\system32\cmd.exe
ORIGINAL_XDG_CURRENT_DESKTOP = undefined
PROCESSOR_REVISION = b701
EFC_7596 = 1
TMP = C:\Users\gogma\AppData\Local\Temp
SystemDrive = C:
OneDriveConsumer = C:\Users\gogma\OneDrive
APPDATA = C:\Users\gogma\AppData\Roaming
Path = C:\Program Files\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\dotnet\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;%JAVA_HOME%\bin;C:\Users\gogma\AppData\Local\Programs\Python\Launcher\;C:\Users\gogma\AppData\Local\Microsoft\WindowsApps;C:\Users\gogma\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\gogma\.dotnet\tools;C:\Users\gogma\AppData\Local\GitHubDesktop\bin;E:\Programme\OpenCV\opencv\build\x64\vc16\bin;
PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
LOCALAPPDATA = C:\Users\gogma\AppData\Local
FPS_BROWSER_APP_PROFILE_STRING = Internet Explorer
stderr[
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Projet Unity\TestPub\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':launcher'.
> Failed to apply plugin 'com.android.internal.application'.
> Cannot parse project property android.enableR8='' of type 'class java.lang.String' as boolean. Expected 'true' or 'false'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
]
stdout[
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <eb865e8041b4430e8b16e0e96097bf17>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <eb865e8041b4430e8b16e0e96097bf17>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <eb865e8041b4430e8b16e0e96097bf17>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <eb865e8041b4430e8b16e0e96097bf17>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <eb865e8041b4430e8b16e0e96097bf17>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <eb865e8041b4430e8b16e0e96097bf17>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <eb865e8041b4430e8b16e0e96097bf17>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <eb865e8041b4430e8b16e0e96097bf17>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)