Search Unity

Bug Help please!!!!!!!!!!!!

Discussion in 'Unity Ads & User Acquisition' started by PapayaLimon, Nov 22, 2022.

  1. PapayaLimon

    PapayaLimon

    Joined:
    Aug 22, 2018
    Posts:
    85
    upload_2022-11-21_20-13-22.png

    I'm so tired to had the same error!! :(:( I had used many solutions online and no one solve this issue!!!! My game works and builds fine until i install the Unity mediation and activate the Main Gradle Template.

    I tried everything, change to 64, use external gradle instalation, change project from folder. Made new project from scratch, Assets - Force resolve, test beta and alpha editors, follow errors instructions, and nothing!!!:(:(:(:(:(:

    Im ready to publish and it works well without ads, I added the mediation package, and make banner works as I need in play version. But still, crash at build with same issues all the time.

    Right now Im using Unity 2021.3.14f1 last stable version, but even in 2022 beta versions nothing work :(:(!!!!
     
  2. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Click on "CommandInvocationFailure" entry and pass the complete log.
     
  3. PapayaLimon

    PapayaLimon

    Joined:
    Aug 22, 2018
    Posts:
    85
    mean this?

    Code (CSharp):
    1. Unable to find player assembly: C:\Users\geral\MyGame\Temp\StagingArea\Data\Managed\UnityEngine.TestRunner.dll
    2. UnityEngine.Debug:LogWarning (object)
    3. Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLsImpl (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.burst@1.6.6/Editor/BurstAotCompiler.cs:350)
    4. Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.burst@1.6.6/Editor/BurstAotCompiler.cs:208)
    5. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    6.  
    7.  
    8. Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
    9.  
    10. > Configure project :launcher
    11. WARNING: The option setting 'android.enableR8=false' is deprecated.
    12. It will be removed in version 5.0 of the Android Gradle plugin.
    13. You will no longer be able to disable R8
    14. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
    15. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    16. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
    17. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
    18. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
    19. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
    20. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    21. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
    22. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
    23. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
    24.  
    25.  
    26. FAILURE: Build failed with an exception.
    27.  
    28.  
    29.  
    30. * What went wrong:
    31. Could not determine the dependencies of task ':launcher:lintVitalRelease'.
    32. > This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.
    33.   The following AndroidX dependencies are detected: androidx.fragment:fragment:1.0.0, androidx.slidingpanelayout:slidingpanelayout:1.0.0, androidx.versionedparcelable:versionedparcelable:1.1.0, androidx.core:core:1.2.0, androidx.customview:customview:1.0.0, androidx.swiperefreshlayout:swiperefreshlayout:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.loader:loader:1.0.0, androidx.drawerlayout:drawerlayout:1.0.0, androidx.viewpager:viewpager:1.0.0, androidx.collection:collection:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core:core-common:2.0.0, androidx.annotation:annotation:1.2.0, androidx.startup:startup-runtime:1.0.0, androidx.tracing:tracing:1.0.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.lifecycle:lifecycle-livedata:2.0.0, androidx.lifecycle:lifecycle-viewmodel:2.0.0, androidx.lifecycle:lifecycle-livedata-core:2.0.0, androidx.arch.core:core-runtime:2.0.0, androidx.legacy:legacy-support-core-utils:1.0.0, androidx.documentfile:documentfile:1.0.0, androidx.cursoradapter:cursoradapter:1.0.0, androidx.lifecycle:lifecycle-runtime:2.0.0, androidx.coordinatorlayout:coordinatorlayout:1.0.0, androidx.asynclayoutinflater:asynclayoutinflater:1.0.0, androidx.print:print:1.0.0
    34.  
    35. * Try:
    36. 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.
    37.  
    38. * Get more help at https://help.gradle.org
    39.  
    40. BUILD FAILED in 5s
    41. Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    42.  
    43. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    44.  
    45.  
    46. CommandInvokationFailure: Gradle build failed.
    47. C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
    48.  
    49. Build completed with a result of 'Failed' in 92 seconds (91521 ms)
    50. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    51.  
    52. UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
    53.   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <6a5b55f2e18b419e9faedac06ac6af94>:0
    54.   at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <6a5b55f2e18b419e9faedac06ac6af94>:0
    55. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    56.  
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,901
    Your error is
    "
    1. > This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry
    "

    You're missing
    Code (CSharp):
    1. android.useAndroidX=true
    in gradle.properties
     
  5. PapayaLimon

    PapayaLimon

    Joined:
    Aug 22, 2018
    Posts:
    85
    Ok, tried but new issues appeared :(.

    Code (CSharp):
    1. Unable to find player assembly: C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Temp\StagingArea\Data\Managed\UnityEngine.TestRunner.dll
    2. UnityEngine.Debug:LogWarning (object)
    3. Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLsImpl (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.burst@1.6.6/Editor/BurstAotCompiler.cs:350)
    4. Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.burst@1.6.6/Editor/BurstAotCompiler.cs:208)
    5. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    6.  
    7. Starting a Gradle Daemon, 1 incompatible and 7 stopped Daemons could not be reused, use --status for details
    8. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
    9. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    10. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
    11. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
    12. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
    13. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
    14. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    15. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
    16. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
    17. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
    18. > Task :launcher:preBuild UP-TO-DATE
    19. > Task :unityLibrary:preBuild UP-TO-DATE
    20. > Task :unityLibrary:preReleaseBuild UP-TO-DATE
    21. > Task :launcher:preReleaseBuild UP-TO-DATE
    22. > Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
    23. > Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
    24. > Task :launcher:generateReleaseResValues UP-TO-DATE
    25. > Task :unityLibrary:generateReleaseResValues UP-TO-DATE
    26. > Task :unityLibrary:generateReleaseResources UP-TO-DATE
    27. > Task :launcher:compileReleaseRenderscript NO-SOURCE
    28. > Task :launcher:generateReleaseResources UP-TO-DATE
    29. > Task :launcher:createReleaseCompatibleScreenManifests UP-TO-DATE
    30. > Task :launcher:extractDeepLinksRelease UP-TO-DATE
    31. > Task :unityLibrary:packageReleaseResources UP-TO-DATE
    32. > Task :unityLibrary:extractDeepLinksRelease UP-TO-DATE
    33. > Task :unityLibrary:processReleaseManifest UP-TO-DATE
    34. > Task :unityLibrary:compileReleaseLibraryResources UP-TO-DATE
    35. > Task :unityLibrary:compileReleaseAidl NO-SOURCE
    36. > Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
    37. > Task :launcher:mergeReleaseResources UP-TO-DATE
    38. > Task :launcher:processReleaseManifest UP-TO-DATE
    39. > Task :launcher:bundleReleaseResources UP-TO-DATE
    40. > Task :unityLibrary:parseReleaseLocalResources UP-TO-DATE
    41. > Task :launcher:checkReleaseDuplicateClasses UP-TO-DATE
    42. > Task :launcher:compileReleaseAidl NO-SOURCE
    43. > Task :launcher:generateReleaseBuildConfig UP-TO-DATE
    44. > Task :unityLibrary:generateReleaseRFile UP-TO-DATE
    45. > Task :unityLibrary:javaPreCompileRelease UP-TO-DATE
    46. > Task :launcher:javaPreCompileRelease UP-TO-DATE
    47. > Task :launcher:processReleaseResources UP-TO-DATE
    48. > Task :launcher:desugarReleaseFileDependencies UP-TO-DATE
    49. > Task :launcher:mergeExtDexRelease UP-TO-DATE
    50. > Task :launcher:mergeReleaseShaders UP-TO-DATE
    51. > Task :launcher:compileReleaseShaders NO-SOURCE
    52. > Task :launcher:generateReleaseAssets UP-TO-DATE
    53. > Task :launcher:processReleaseJavaRes NO-SOURCE
    54. > Task :launcher:mergeReleaseJniLibFolders UP-TO-DATE
    55. > Task :launcher:collectReleaseDependencies UP-TO-DATE
    56. > Task :launcher:configureReleaseDependencies UP-TO-DATE
    57. > Task :launcher:parseReleaseIntegrityConfig UP-TO-DATE
    58. > Task :launcher:validateSigningRelease UP-TO-DATE
    59.  
    60. > Task :unityLibrary:compileReleaseJavaWithJavac FAILED
    61. 28 actionable tasks: 1 executed, 27 up-to-date
    62.  
    63. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    64.  
    65. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:11: error: cannot find symbol
    66. import com.unity3d.mediation.BannerAdView;
    67.                             ^
    68.   symbol:   class BannerAdView
    69.   location: package com.unity3d.mediation
    70. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:12: error: cannot find symbol
    71. import com.unity3d.mediation.BannerAdViewSize;
    72.                             ^
    73.   symbol:   class BannerAdViewSize
    74.   location: package com.unity3d.mediation
    75. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:13: error: cannot find symbol
    76. import com.unity3d.mediation.IBannerAdViewListener;
    77.                             ^
    78.   symbol:   class IBannerAdViewListener
    79.   location: package com.unity3d.mediation
    80. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:14: error: package com.unity3d.mediation.errors does not exist
    81. import com.unity3d.mediation.errors.LoadError;
    82.                                    ^
    83. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:18: error: cannot find symbol
    84.     BannerAdView bannerAdView;
    85.     ^
    86.   symbol:   class BannerAdView
    87.   location: class BannerAd
    88. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:22: error: cannot find symbol
    89.     public BannerAd(Activity activity, String adUnitId, BannerAdViewSize size, IBannerAdViewListener bannerListener) {
    90.                                                         ^
    91.   symbol:   class BannerAdViewSize
    92.   location: class BannerAd
    93. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:22: error: cannot find symbol
    94.     public BannerAd(Activity activity, String adUnitId, BannerAdViewSize size, IBannerAdViewListener bannerListener) {
    95.                                                                                ^
    96.   symbol:   class IBannerAdViewListener
    97.   location: class BannerAd
    98. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:65: error: cannot find symbol
    99.     public AdState getAdState() {
    100.            ^
    101.   symbol:   class AdState
    102.   location: class BannerAd
    103. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:25: error: cannot find symbol
    104.         this.bannerAdView = new BannerAdView(activity);
    105.                                 ^
    106.   symbol:   class BannerAdView
    107.   location: class BannerAd
    108. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:30: error: cannot find symbol
    109.         bannerAdView.setListener(new IBannerAdViewListener() {
    110.                                      ^
    111.   symbol:   class IBannerAdViewListener
    112.   location: class BannerAd
    113. 10 errors
    114.  
    115. FAILURE: Build failed with an exception.
    116.  
    117. * What went wrong:
    118. Execution failed for task ':unityLibrary:compileReleaseJavaWithJavac'.
    119. > Compilation failed; see the compiler error output for details.
    120.  
    121. * Try:
    122. 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.
    123.  
    124. * Get more help at https://help.gradle.org
    125.  
    126. BUILD FAILED in 4s
    127. Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    128.  
    129. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    130.  
    131. CommandInvokationFailure: Gradle build failed.
    132. C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "bundleRelease"
    133.  
    134. Environment Variables:
    135. USERDOMAIN = CUTYDINA
    136. ProgramFiles = C:\Program Files
    137. TMP = C:\Users\geral\AppData\Local\Temp
    138. OneDrive = C:\Users\geral\OneDrive
    139. PROCESSOR_ARCHITECTURE = AMD64
    140. PROCESSOR_REVISION = a701
    141. OneDriveConsumer = C:\Users\geral\OneDrive
    142. OS = Windows_NT
    143. CHROME_CRASHPAD_PIPE_NAME = \\.\pipe\crashpad_10700_RWYYEKWREYOEKFWH
    144. PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 167 Stepping 1, GenuineIntel
    145. ProgramW6432 = C:\Program Files
    146. GRADLE = C:\Gradle\gradle-6.9.3\bin
    147. USERPROFILE = C:\Users\geral
    148. JAVA_HOME = C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
    149. JD2_HOME = C:\Users\geral\AppData\Local\JDownloader 2.0
    150. DriverData = C:\Windows\System32\Drivers\DriverData
    151. ComSpec = C:\WINDOWS\system32\cmd.exe
    152. PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
    153. ANDROID_NDK_ROOT = C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK
    154. SystemRoot = C:\WINDOWS
    155. NUMBER_OF_PROCESSORS = 16
    156. JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF-8
    157. BURST_ANDROID_MIN_API_LEVEL = 22
    158. FPS_BROWSER_APP_PROFILE_STRING = Internet Explorer
    159. TEMP = C:\Users\geral\AppData\Local\Temp
    160. 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\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\dotnet\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\geral\AppData\Local\Microsoft\WindowsApps;
    161. USERNAME = geral
    162. COMPUTERNAME = CUTYDINA
    163. PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    164. ALLUSERSPROFILE = C:\ProgramData
    165. SystemDrive = C:
    166. windir = C:\WINDOWS
    167. FPS_BROWSER_USER_PROFILE_STRING = Default
    168. HOMEPATH = \Users\geral
    169. PUBLIC = C:\Users\Public
    170. CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
    171. APPDATA = C:\Users\geral\AppData\Roaming
    172. CommonProgramFiles = C:\Program Files\Common Files
    173. PROCESSOR_LEVEL = 6
    174. CommonProgramW6432 = C:\Program Files\Common Files
    175. ProgramFiles(x86) = C:\Program Files (x86)
    176. SESSIONNAME = Console
    177. LOGONSERVER = \\CUTYDINA
    178. LOCALAPPDATA = C:\Users\geral\AppData\Local
    179. HOMEDRIVE = C:
    180. USERDOMAIN_ROAMINGPROFILE = CUTYDINA
    181. ProgramData = C:\ProgramData
    182. ORIGINAL_XDG_CURRENT_DESKTOP = undefined
    183.  
    184.  
    185. stderr[
    186. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:11: error: cannot find symbol
    187. import com.unity3d.mediation.BannerAdView;
    188.                             ^
    189.   symbol:   class BannerAdView
    190.   location: package com.unity3d.mediation
    191. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:12: error: cannot find symbol
    192. import com.unity3d.mediation.BannerAdViewSize;
    193.                             ^
    194.   symbol:   class BannerAdViewSize
    195.   location: package com.unity3d.mediation
    196. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:13: error: cannot find symbol
    197. import com.unity3d.mediation.IBannerAdViewListener;
    198.                             ^
    199.   symbol:   class IBannerAdViewListener
    200.   location: package com.unity3d.mediation
    201. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:14: error: package com.unity3d.mediation.errors does not exist
    202. import com.unity3d.mediation.errors.LoadError;
    203.                                    ^
    204. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:18: error: cannot find symbol
    205.     BannerAdView bannerAdView;
    206.     ^
    207.   symbol:   class BannerAdView
    208.   location: class BannerAd
    209. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:22: error: cannot find symbol
    210.     public BannerAd(Activity activity, String adUnitId, BannerAdViewSize size, IBannerAdViewListener bannerListener) {
    211.                                                         ^
    212.   symbol:   class BannerAdViewSize
    213.   location: class BannerAd
    214. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:22: error: cannot find symbol
    215.     public BannerAd(Activity activity, String adUnitId, BannerAdViewSize size, IBannerAdViewListener bannerListener) {
    216.                                                                                ^
    217.   symbol:   class IBannerAdViewListener
    218.   location: class BannerAd
    219. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:65: error: cannot find symbol
    220.     public AdState getAdState() {
    221.            ^
    222.   symbol:   class AdState
    223.   location: class BannerAd
    224. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:25: error: cannot find symbol
    225.         this.bannerAdView = new BannerAdView(activity);
    226.                                 ^
    227.   symbol:   class BannerAdView
    228.   location: class BannerAd
    229. C:\Geraldina\MobileGame\TheSpiderAndTheSnake\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\mediation\BannerAd.java:30: error: cannot find symbol
    230.         bannerAdView.setListener(new IBannerAdViewListener() {
    231.                                      ^
    232.   symbol:   class IBannerAdViewListener
    233.   location: class BannerAd
    234. 10 errors
    235.  
    236. FAILURE: Build failed with an exception.
    237.  
    238. * What went wrong:
    239. Execution failed for task ':unityLibrary:compileReleaseJavaWithJavac'.
    240. > Compilation failed; see the compiler error output for details.
    241.  
    242. * Try:
    243. 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.
    244.  
    245. * Get more help at https://help.gradle.org
    246.  
    247. BUILD FAILED in 4s
    248. Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    249. ]
    250. stdout[
    251. Starting a Gradle Daemon, 1 incompatible and 7 stopped Daemons could not be reused, use --status for details
    252. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
    253. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    254. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
    255. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
    256. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
    257. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
    258. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    259. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
    260. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
    261. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
    262. > Task :launcher:preBuild UP-TO-DATE
    263. > Task :unityLibrary:preBuild UP-TO-DATE
    264. > Task :unityLibrary:preReleaseBuild UP-TO-DATE
    265. > Task :launcher:preReleaseBuild UP-TO-DATE
    266. > Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
    267. > Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
    268. > Task :launcher:generateReleaseResValues UP-TO-DATE
    269. > Task :unityLibrary:generateReleaseResValues UP-TO-DATE
    270. > Task :unityLibrary:generateReleaseResources UP-TO-DATE
    271. > Task :launcher:compileReleaseRenderscript NO-SOURCE
    272. > Task :launcher:generateReleaseResources UP-TO-DATE
    273. > Task :launcher:createReleaseCompatibleScreenManifests UP-TO-DATE
    274. > Task :launcher:extractDeepLinksRelease UP-TO-DATE
    275. > Task :unityLibrary:packageReleaseResources UP-TO-DATE
    276. > Task :unityLibrary:extractDeepLinksRelease UP-TO-DATE
    277. > Task :unityLibrary:processReleaseManifest UP-TO-DATE
    278. > Task :unityLibrary:compileReleaseLibraryResources UP-TO-DATE
    279. > Task :unityLibrary:compileReleaseAidl NO-SOURCE
    280. > Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
    281. > Task :launcher:mergeReleaseResources UP-TO-DATE
    282. > Task :launcher:processReleaseManifest UP-TO-DATE
    283. > Task :launcher:bundleReleaseResources UP-TO-DATE
    284. > Task :unityLibrary:parseReleaseLocalResources UP-TO-DATE
    285. > Task :launcher:checkReleaseDuplicateClasses UP-TO-DATE
    286. > Task :launcher:compileReleaseAidl NO-SOURCE
    287. > Task :launcher:generateReleaseBuildConfig UP-TO-DATE
    288. > Task :unityLibrary:generateReleaseRFile UP-TO-DATE
    289. > Task :unityLibrary:javaPreCompileRelease UP-TO-DATE
    290. > Task :launcher:javaPreCompileRelease UP-TO-DATE
    291. > Task :launcher:processReleaseResources UP-TO-DATE
    292. > Task :launcher:desugarReleaseFileDependencies UP-TO-DATE
    293. > Task :launcher:mergeExtDexRelease UP-TO-DATE
    294. > Task :launcher:mergeReleaseShaders UP-TO-DATE
    295. > Task :launcher:compileReleaseShaders NO-SOURCE
    296. > Task :launcher:generateReleaseAssets UP-TO-DATE
    297. > Task :launcher:processReleaseJavaRes NO-SOURCE
    298. > Task :launcher:mergeReleaseJniLibFolders UP-TO-DATE
    299. > Task :launcher:collectReleaseDependencies UP-TO-DATE
    300. > Task :launcher:configureReleaseDependencies UP-TO-DATE
    301. > Task :launcher:parseReleaseIntegrityConfig UP-TO-DATE
    302. > Task :launcher:validateSigningRelease UP-TO-DATE
    303.  
    304. > Task :unityLibrary:compileReleaseJavaWithJavac FAILED
    305. 28 actionable tasks: 1 executed, 27 up-to-date
    306. ]
    307. exit code: 1
    308. UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <b5a1f7b6d39d4ca78ca284153b2ea92d>:0)
    309. UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <b5a1f7b6d39d4ca78ca284153b2ea92d>:0)
    310. UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <b5a1f7b6d39d4ca78ca284153b2ea92d>:0)
    311. UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <b5a1f7b6d39d4ca78ca284153b2ea92d>:0)
    312. 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 <b5a1f7b6d39d4ca78ca284153b2ea92d>:0)
    313. Rethrow as GradleInvokationException: Gradle build failed
    314. 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 <b5a1f7b6d39d4ca78ca284153b2ea92d>:0)
    315. UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <b5a1f7b6d39d4ca78ca284153b2ea92d>:0)
    316. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <b5a1f7b6d39d4ca78ca284153b2ea92d>:0)
    317. Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    318. UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <b5a1f7b6d39d4ca78ca284153b2ea92d>:0)
    319. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <b5a1f7b6d39d4ca78ca284153b2ea92d>:0)
    320. UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput buildProgramOutput) (at <b5a1f7b6d39d4ca78ca284153b2ea92d>:0)
    321. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <b5a1f7b6d39d4ca78ca284153b2ea92d>:0)
    322. UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <6a5b55f2e18b419e9faedac06ac6af94>:0)
    323. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    324.  
    325. Build completed with a result of 'Failed' in 60 seconds (60191 ms)
    326. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    327.  
    328. UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
    329.   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <6a5b55f2e18b419e9faedac06ac6af94>:0
    330.   at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <6a5b55f2e18b419e9faedac06ac6af94>:0
    331. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

    I tried unistalling everything and just install Gradle and works fine, but the moment I add Mediation everything broke. Is better with Unity Ads? Im suffering a lot with mediation. Im getting crazy with this issues. Also when I try to build it ask me to use android resolver, and in that moment my changes in gradle.properties disapeared :(
     
  6. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,901
    Moved your thread to Unity Ads, since the API seems to come from Ads package
     
  7. PapayaLimon

    PapayaLimon

    Joined:
    Aug 22, 2018
    Posts:
    85
    ok, thanks!
     
  8. PapayaLimon

    PapayaLimon

    Joined:
    Aug 22, 2018
    Posts:
    85
    any answer about the issue? :(
     
  9. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    If you are facing the same error, add the below lines in gradle.properties file (can be generated from player settings -> Android -> Other settings)

    Code (CSharp):
    1. android.useAndroidX=true
    2. android.enableJetifier=true
     
  10. PapayaLimon

    PapayaLimon

    Joined:
    Aug 22, 2018
    Posts:
    85
    No, still fail on build. :(

    Code (CSharp):
    1. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.1.23f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
    2. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.1.23f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    3. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.1.23f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
    4. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.1.23f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
    5. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.1.23f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
    6.  
    7. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    8.  
    9.  
    10. FAILURE: Build failed with an exception.
    11.  
    12. * What went wrong:
    13. Could not determine the dependencies of task ':launcher:processDebugResources'.
    14. > Could not resolve all task dependencies for configuration ':launcher:debugRuntimeClasspath'.
    15.    > Did not resolve 'android.arch.core:runtime:1.1.1' which is part of the dependency lock state
    16.    > Did not resolve 'android.arch.lifecycle:livedata-core:1.1.1' which is part of the dependency lock state
    17.    > Did not resolve 'android.arch.lifecycle:livedata:1.1.1' which is part of the dependency lock state
    18.    > Did not resolve 'com.android.support:support-core-utils:26.1.0' which is part of the dependency lock state
    19.    > Resolved 'androidx.lifecycle:lifecycle-service:2.0.0' which is not part of the dependency lock state
    20.    > Did not resolve 'android.arch.lifecycle:extensions:1.1.1' which is part of the dependency lock state
    21.    > Resolved 'androidx.lifecycle:lifecycle-extensions:2.0.0' which is not part of the dependency lock state
    22.    > Did not resolve 'com.android.support:support-core-ui:26.1.0' which is part of the dependency lock state
    23.    > Did not resolve 'android.arch.lifecycle:viewmodel:1.1.1' which is part of the dependency lock state
    24.    > Did not resolve 'com.android.support:support-fragment:26.1.0' which is part of the dependency lock state
    25.    > Did not resolve 'com.android.support:support-compat:26.1.0' which is part of the dependency lock state
    26.    > Did not resolve 'com.android.support:support-annotations:26.1.0' which is part of the dependency lock state
    27.    > Did not resolve 'android.arch.lifecycle:common:1.1.1' which is part of the dependency lock state
    28.    > Did not resolve 'android.arch.core:common:1.1.1' which is part of the dependency lock state
    29.    > Resolved 'androidx.lifecycle:lifecycle-process:2.0.0' which is not part of the dependency lock state
    30.    > Did not resolve 'android.arch.lifecycle:runtime:1.1.1' which is part of the dependency lock state
    31.  
    32. * Try:
    33. 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.
    34.  
    35. * Get more help at https://help.gradle.org
    36.  
    37. BUILD FAILED in 913ms
    38. Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    39.  
    40. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    41.  
    42. CommandInvokationFailure: Gradle build failed.
    43. C:\Program Files\Unity\Hub\Editor\2022.1.23f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2022.1.23f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleDebug"
    44.  
    45. stderr[
    46.  
    47. FAILURE: Build failed with an exception.
    48.  
    49. * What went wrong:
    50. Could not determine the dependencies of task ':launcher:processDebugResources'.
    51. > Could not resolve all task dependencies for configuration ':launcher:debugRuntimeClasspath'.
    52.    > Did not resolve 'android.arch.core:runtime:1.1.1' which is part of the dependency lock state
    53.    > Did not resolve 'android.arch.lifecycle:livedata-core:1.1.1' which is part of the dependency lock state
    54.    > Did not resolve 'android.arch.lifecycle:livedata:1.1.1' which is part of the dependency lock state
    55.    > Did not resolve 'com.android.support:support-core-utils:26.1.0' which is part of the dependency lock state
    56.    > Resolved 'androidx.lifecycle:lifecycle-service:2.0.0' which is not part of the dependency lock state
    57.    > Did not resolve 'android.arch.lifecycle:extensions:1.1.1' which is part of the dependency lock state
    58.    > Resolved 'androidx.lifecycle:lifecycle-extensions:2.0.0' which is not part of the dependency lock state
    59.    > Did not resolve 'com.android.support:support-core-ui:26.1.0' which is part of the dependency lock state
    60.    > Did not resolve 'android.arch.lifecycle:viewmodel:1.1.1' which is part of the dependency lock state
    61.    > Did not resolve 'com.android.support:support-fragment:26.1.0' which is part of the dependency lock state
    62.    > Did not resolve 'com.android.support:support-compat:26.1.0' which is part of the dependency lock state
    63.    > Did not resolve 'com.android.support:support-annotations:26.1.0' which is part of the dependency lock state
    64.    > Did not resolve 'android.arch.lifecycle:common:1.1.1' which is part of the dependency lock state
    65.    > Did not resolve 'android.arch.core:common:1.1.1' which is part of the dependency lock state
    66.    > Resolved 'androidx.lifecycle:lifecycle-process:2.0.0' which is not part of the dependency lock state
    67.    > Did not resolve 'android.arch.lifecycle:runtime:1.1.1' which is part of the dependency lock state
    68.  
    69. * Try:
    70. 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.
    71.  
    72. * Get more help at https://help.gradle.org
    73.  
    74. BUILD FAILED in 913ms
    75. Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    76. ]
    77. stdout[
    78. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.1.23f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
    79. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.1.23f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    80. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.1.23f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
    81. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.1.23f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
    82. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.1.23f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
    83. ]
    84. exit code: 1
    85. UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
    86. UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
    87. UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
    88. UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
    89. 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 <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
    90. Rethrow as GradleInvokationException: Gradle build failed
    91. 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 <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
    92. UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
    93. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
    94. Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    95. UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
    96. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
    97. UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput buildProgramOutput) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
    98. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
    99. UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <4ce403b7cdf744109283ae55cdc24285>:0)
    100. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    101.  
    102. Build completed with a result of 'Failed' in 68 seconds (67978 ms)
    103. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    104.  
    105. UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
    106.   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <4ce403b7cdf744109283ae55cdc24285>:0
    107.   at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <4ce403b7cdf744109283ae55cdc24285>:0
    108. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
     
  11. PapayaLimon

    PapayaLimon

    Joined:
    Aug 22, 2018
    Posts:
    85
    Also, didn't find the option on Player Settings, I added the code on gradle.properties but when I resolve it return to their original code :(. Any way to do the build without gradle? I tried multiple things, I use gradle from unity, install external, and always the same, what i dont understand is about the lock files :(
     
  12. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Do you use custom gradle file? If so share it.
     
  13. PapayaLimon

    PapayaLimon

    Joined:
    Aug 22, 2018
    Posts:
    85
    Yes, I use custom main gradle templae, but it reset all time when I build. Is there an option when it don't reset when i click on resolve?

    Captura de pantalla_20221129_100237.png

    Here is how my custom gradle file looks after I modify:

    Code (CSharp):
    1. org.gradle.jvmargs=-Xmx4096M
    2. org.gradle.parallel=true
    3. //android.enableR8=false
    4. unityStreamingAssets=
    5. unityTemplateVersion=3
    6. android.bundle.enableUncompressedNativeLibs=false
    7. android.useAndroidX=true
    8. android.enableJetifier=true
     
  14. javierron90

    javierron90

    Joined:
    Feb 1, 2020
    Posts:
    3
    Were you able to solve this problem?
     
  15. PapayaLimon

    PapayaLimon

    Joined:
    Aug 22, 2018
    Posts:
    85
    Yes, I fixed it. The problem i see is levelPlay doesn't work on Unity 2022 as i have been testing, it gives me a lot of warnings and didn't display neither on build. Only on 2021, hoping they soon fix that issue.
     
    javierron90 likes this.