Build failing with Google Play Services Plugin. Could not find

I am trying to build my app for android. I currently have the Google AdMob package installed as well as the Google Play Services plugin however it is failing to build with the google play services package.

> Could not find
     Searched in the following locations:
       - file:UNITY_PROJECT/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/gpgs-plugin-support-0.11.01.jar
       - file:UNITY_PROJECT/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/gpgs-plugin-support.jar

I already have the location set correctly in


<?xml version="1.0" encoding="UTF-8" ?>
<!-- Internal library dependency generated at build time. 
    It also defines the transitive dependencies on play-services
    <androidPackage spec="">

I have done multiple force resolves, I have changed the JAVA_HOME environment variable. I am at a complete loss as to what is causing this issue and I suspect it’s something to do with the admob package and Google Play Services conflicting.


I was having exactly the same problem with GooglePlayGames & GoogleSignIn. Here’s how I solved it:

Unity version: 2022.3
Scripting backend: IL2CPP
Build type: App Bundle

First, make sure you’ve done the other things in correct order:

  1. Enable Custom Main Gradle Template, Custom Gradle Properties Template & Custom Gradle Settings Template

  2. Force Resolve Libraries using Android Dependency Manager

  3. Restart Unity once (optional)

  4. Check <repository> path in Assets/GooglePlayGames/
    Make sure its Assets/GooglePlayGames/ and not Library/GooglePlayGames/

  5. Open and make sure you see these lines:


If not, then add them manually.

The actual solution steps:

  1. Open mainTemplate.gradle and find two separate lines:
    def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
    url (unityProjectPath + "/Assets/GeneratedLocalRepo/GoogleSignIn/Editor/m2repository") inside a maven block. In your case it should be GooglePlayGames.

  2. Open settingsTemplate.gradle, paste the above lines together inside dependencyResolutionManagement → repositories

It should look like:

dependencyResolutionManagement {
    repositories {
        def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
        maven {
            url (unityProjectPath + "/Assets/GeneratedLocalRepo/GoogleSignIn/Editor/m2repository") // Assets/GoogleSignIn/Editor/GoogleSignInSupportDependencies.xml:9
        flatDir {
            dirs "${project(':unityLibrary').projectDir}/libs"

In your case again, it should be GooglePlayGames, not GoogleSignIn.

That should be it! Probably not the best solution, just a way to successfully get past gradle build for now.

Hi !
I have exactly the same problem, despite the procedures followed to the letter I still get the error message. I created a new project in doubt, there is no other package that could harm the build.

If I comment out the implement line in the mainTemplate I can build without problem.

This is the error message :
FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

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

Could not resolve all dependencies for configuration ‘:launcher:releaseRuntimeClasspath’.
The project declares repositories, effectively ignoring the repositories you have declared in the settings.
You can figure out how project repositories are declared by configuring your build to fail on project repositories.
See Declaring repositories for details.
Could not find
Searched in the following locations:
- file:/H:/Test_Google_Login/Assets/GeneratedLocalRepo/GooglePlayGames/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom
- file:/H:/Test_Google_Login/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/gpgs-plugin-support-0.11.01.jar
- file:/H:/Test_Google_Login/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/gpgs-plugin-support.jar
Required by:
project :launcher > project :unityLibrary

Do you have some other idea ? Thank a lot

Using Unity 2022.3.6f1

Too complicated. Here try this

  1. Open file: Assets/GooglePlayGames/

  2. Find the following line


  1. Replace it with:


  1. Save and close file
  2. On Unity, click menu AssetsExternal Dependency ManagerAndroid ResolverForce Resolve
  3. Lift your hands up into the air and praise God Almighty, you’re done.