Gradle Build Issue Please Help :c

Hi there,

I’m trying to update my game APIs for the new play store rules. I’m really scared to get my app deleted to be honest. I updated all plugins, downloaded all the right APKs with android studio, Cmake, and plateform. I tried a lot of different things but I keep getting errors with the gradle file and I don’t understand what I can do to solve it. I tried to find the solution on internet but really I find nothing. Here is the log :

Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':launcher:mergeDexRelease'.
> Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'.
   > Failed to transform classes.jar (project :unityLibrary) to match attributes {artifactType=android-dex, com.android.build.api.attributes.AgpVersionAttr=8.3.0, com.android.build.api.attributes.BuildTypeAttr=release, com.android.build.gradle.internal.attributes.VariantAttr=release, dexing-component-attributes=ComponentSpecificParameters(minSdkVersion=23, debuggable=false, enableCoreLibraryDesugaring=false, enableGlobalSynthetics=true, enableApiModeling=true, dependenciesClassesAreInstrumented=false, asmTransformComponent=null, useJacocoTransformInstrumentation=false, enableDesugaring=true, needsClasspath=true, useFullClasspath=false, componentIfUsingFullClasspath=null), org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'.
         > No variants of com.google.games:gpgs-plugin-support:0.11.01 match the consumer attributes:
             - com.google.games:gpgs-plugin-support:0.11.01 configuration runtime declares a library for use during runtime:
                 - Incompatible because this component declares a component, as well as attribute 'artifactType' with value 'srcaar' and the consumer needed a component, as well as attribute 'artifactType' with value 'android-classes-jar'
                 - Other compatible attributes:
                     - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.3.0')
                     - Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'release')
                     - Doesn't say anything about dexing-component-attributes (required 'ComponentSpecificParameters(minSdkVersion=23, debuggable=false, enableCoreLibraryDesugaring=false, enableGlobalSynthetics=true, enableApiModeling=true, dependenciesClassesAreInstrumented=false, asmTransformComponent=null, useJacocoTransformInstrumentation=false, enableDesugaring=true, needsClasspath=true, useFullClasspath=false, componentIfUsingFullClasspath=null)')
                     - Doesn't say anything about its target Java environment (preferred optimized for Android)

* 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 3s

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Please help, I hope I’m putting this at the right place

Haven’t seen such before, but seems that Google Play Games Plugin wasn’t properly imported/configured. Try removing it and reimporting again

I deleted then reimported the pulgin. The ressources was indeed not actualized too. But now I’m getting a similar message : `

Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.
Note: D:\Antoine\Travail\ProjetUnity\SlidingFrog\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:launcher:mergeReleaseGlobalSynthetics’.

Could not resolve all files for configuration ‘:launcher:releaseRuntimeClasspath’.
Failed to transform classes.jar (project :unityLibrary) to match attributes {artifactType=android-global-synthetics, com.android.build.api.attributes.AgpVersionAttr=8.3.0, com.android.build.api.attributes.BuildTypeAttr=release, com.android.build.gradle.internal.attributes.VariantAttr=release, dexing-component-attributes=ComponentSpecificParameters(minSdkVersion=23, debuggable=false, enableCoreLibraryDesugaring=false, enableGlobalSynthetics=true, enableApiModeling=true, dependenciesClassesAreInstrumented=false, asmTransformComponent=null, useJacocoTransformInstrumentation=false, enableDesugaring=true, needsClasspath=true, useFullClasspath=false, componentIfUsingFullClasspath=null), org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
Could not resolve all files for configuration ‘:launcher:releaseRuntimeClasspath’.
No variants of com.google.games:gpgs-plugin-support:0.11.01 match the consumer attributes:
- com.google.games:gpgs-plugin-support:0.11.01 configuration runtime declares a library for use during runtime:
- Incompatible because this component declares a component, as well as attribute ‘artifactType’ with value ‘srcaar’ and the consumer needed a component, as well as attribute ‘artifactType’ with value ‘android-classes-jar’
- Other compatible attributes:
- Doesn’t say anything about com.android.build.api.attributes.AgpVersionAttr (required ‘8.3.0’)
- Doesn’t say anything about com.android.build.api.attributes.BuildTypeAttr (required ‘release’)
- Doesn’t say anything about dexing-component-attributes (required ‘ComponentSpecificParameters(minSdkVersion=23, debuggable=false, enableCoreLibraryDesugaring=false, enableGlobalSynthetics=true, enableApiModeling=true, dependenciesClassesAreInstrumented=false, asmTransformComponent=null, useJacocoTransformInstrumentation=false, enableDesugaring=true, needsClasspath=true, useFullClasspath=false, componentIfUsingFullClasspath=null)’)
- Doesn’t say anything about its target Java environment (preferred optimized for Android)

I’m sorry, I understand nothing to all this kind of things and it’s really difficult for me to figure out what is happening right now. Help much appreciated thank you !

`

Same problem here, but in Unity 2022.3.52 with Google Play Games plugin v11.01.

Upd: I managed to build it by turning off Patch mainTemplate.gradle in External Dependency Manager.

1 Like

Having the same error for days.
Are you having any solution ?

This solution, helps me