Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

BUILD FAILED: Could not find com.google.android.gms:play-services-auth:11.8.0 #478

Open
scottforte opened this issue Apr 4, 2018 · 22 comments

Comments

@scottforte
Copy link

scottforte commented Apr 4, 2018

<framework src="com.google.android.gms:play-services-auth:11.8.0" />

Phonegap Build is failing with this exception:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'project'.
> Could not resolve all dependencies for configuration ':_debugApkCopy'.
   > Could not find com.google.android.gms:play-services-auth:11.8.0.
     Required by:
         project :
   > Could not find com.google.android.gms:play-services-identity:11.8.0.
     Required by:
         project :

I tried removing the plugin, just to confirm the plugin was actually causing the error. Once I removed the plugin, the build succeeded. So it is the plugin, and this is the only line of code that looks like it could be causing the error. Not sure how to solve it, wish I could be of more help.

The plugin was working fine about a month ago.

Using: Phonegap Build
Version of Plugin: latest <plugin name="cordova-plugin-googleplus" source="npm">

Here is the full error Message. Not sure is this helps.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'project'.
> Could not resolve all dependencies for configuration ':_debugApkCopy'.
   > Could not find com.google.android.gms:play-services-auth:11.8.0.
     Required by:
         project :
   > Could not find com.google.android.gms:play-services-identity:11.8.0.
     Required by:
         project :

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 3.256 secs
Error: /project/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'project'.
> Could not resolve all dependencies for configuration ':_debugApkCopy'.
   > Could not find com.google.android.gms:play-services-auth:11.8.0.
     Required by:
         project :
   > Could not find com.google.android.gms:play-services-identity:11.8.0.
     Required by:
         project :

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
@scottforte scottforte changed the title BUILD FAILED: BUILD FAILED: Could not find com.google.android.gms:play-services-auth:11.8.0 Apr 4, 2018
@EddyVerbruggen
Copy link
Owner

Cause: #474, not sure what to do.. switching back to the old version will give other issues.

@lvloper
Copy link

lvloper commented Apr 6, 2018

I managed to correct this error by changing the version of com.google.android.gms:play-services-identity and com.google.android.gms:play-services-auth from 11.8.0 to 11.0.4 in my platforms/android/project.properties

@scottforte
Copy link
Author

Hey @EddyVerbruggen, can you elaborate when you say "other issues". Is going back to 11.0.4 as @lucianomizra suggested the best "for now" fix?

@EddyVerbruggen
Copy link
Owner

The issues mentioned in the linked bug.

@gilzonme
Copy link

Did anyone found solution for this?

@oleksii-lyhun
Copy link

I solved this problem simply by changing the version of android in config.xml <engine name="android" spec="^7.0.0" />
Or you can open file

platforms->android->build.gradle

and add code maven { url "https://maven.google.com" } to buildscript.repositories and to allprojects.repositories

@KlejdyszS
Copy link

KlejdyszS commented Apr 27, 2018

I did all the things you guys posted, but it still does not compile in phonegap build, anyone has some better solution?

I still get error

Could not find com.google.android.gms:play-services-auth:11.8.0.

after including

<plugin name="cordova-plugin-googleplus" source="npm">

@gilzonme
Copy link

gilzonme commented May 6, 2018

@KlejdyszS i did this by changing the version to a lower one. And it worked.

@vipulism
Copy link

vipulism commented May 8, 2018

@lucianomizra these changes works for me when i made the same changes in my platforms/android/build-extras.gradle all version of 11.8.0 to 11.0.4
thanks

@DRKRahul
Copy link

@EddyVerbruggen did you get any solution for this issue?

@coldwhiz
Copy link

Using phonegap build with "phonegap-version" as "cli-8.0.0" and "pgb-builder-version" as "2", I am facing a different issue. It is asking to use a higher version 11.6.2. For now using a fork as quick fix.

BUILD FAILED in 9s
18 actionable tasks: 18 executed
Error: /gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processReleaseGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.6.2.

* 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 9s
    at ChildProcess.whenDone (/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

@garybentley
Copy link

In phonegap build, changing:

com.google.android.gms:play-services-auth:11.8.0
com.google.android.gms:play-services-identity:11.8.0

to:

com.google.android.gms:play-services-auth:+
com.google.android.gms:play-services-identity:+

allowed a clean build. I used a cloned repo and created my own plugin but with only those changes.

The login works.

@patelashish16
Copy link

my issue solve

cordova plugin remove cordova-plugin-google-analytics

ionic cordova platform rm android

ionic cordova platform add android

ionic cordova build android

work fine

@bppearsoft
Copy link

i use the ionic pro package service and it was failing with 11.8.0. I fixed it by changing this in my package.json file:
"PLAY_SERVICES_VERSION": "11.6.2"

@MarcosRibeiroJesus
Copy link

In phonegap build, changing:

com.google.android.gms:play-services-auth:11.8.0
com.google.android.gms:play-services-identity:11.8.0

to:

com.google.android.gms:play-services-auth:+
com.google.android.gms:play-services-identity:+

allowed a clean build. I used a cloned repo and created my own plugin but with only those changes.

The login works.

`A problem occurred evaluating root project 'android'.

Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']
For input string: "+"`

@amamitpandey
Copy link

in Ionic 3

Update file from plateform -> android -> project-properties

target=android-27
android.library.reference.1=CordovaLib
android.library.reference.2=app
cordova.system.library.1=com.squareup.okhttp3:okhttp-urlconnection:3.10.0
cordova.system.library.2=com.android.support:support-v4:24.1.1+
cordova.system.library.3=com.facebook.android:facebook-android-sdk:4.36.0
cordova.system.library.4=com.google.firebase:firebase-core:10.+
cordova.system.library.5=com.google.firebase:firebase-messaging:10.+
cordova.gradle.include.1=cordova-plugin-fcm-with-dependecy-updated/app-FCMPlugin.gradle
cordova.system.library.6=com.google.android.gms:play-services-auth:10.+
cordova.system.library.7=com.google.android.gms:play-services-identity:10.+

cordova.system.library.8=com.android.support:support-v4:24.1.1+

and build it once again for android

it working for me

@davinderkumar
Copy link

I am also getting this problem, on Meteor 1.8. Here is error log

:javaPreCompileRelease FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':releaseCompileClasspath'.
> Could not find play-services-identity.jar (com.google.android.gms:play-services-identity:11.8.0).
  Searched in the following locations:
      https://jcenter.bintray.com/com/google/android/gms/play-services-identity/11.8.0/play-services-identity-11.8.0.jar

* 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 2s
27 actionable tasks: 2 executed, 25 up-to-date
=> Errors executing Cordova commands:         
                                              
   While building Cordova app for platform Android:
   Error: /Users/davinder/Work/map/appname/app/.meteor/local/cordova-build/platforms/android/gradlew: Command failed with exit code 1 Error output:
   FAILURE: Build failed with an exception.
   
   * What went wrong:
   Could not resolve all files for configuration ':releaseCompileClasspath'.
   > Could not find play-services-identity.jar (com.google.android.gms:play-services-identity:11.8.0).
   Searched in the following locations:
   https://jcenter.bintray.com/com/google/android/gms/play-services-identity/11.8.0/play-services-identity-11.8.0.jar

It was fixed after I changed android - project.properties file line
cordova.system.library.4=com.google.android.gms:play-services-identity:11.8.0
to
cordova.system.library.4=com.google.android.gms:play-services-identity:11.0.4

my previous builds with 1.6 has
cordova.system.library.4=com.google.android.gms:play-services-identity:+

is there any fix available to this so I do not have to manually change these versions?

@patelashish16
Copy link

patelashish16 commented Mar 28, 2019 via email

@Piter-Ruiz
Copy link

Hey @amamitpandey so much thank you!! It working for me!!

@ngthienlinh
Copy link

ngthienlinh commented Aug 15, 2019

I have the same build error. Fix it by editing platforms/android/build.gradle, make sure jcenter() is below maven:

...
buildscript {
    repositories {
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }
}
...
allprojects {
    repositories {
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }
}
...

@mayankkataria
Copy link

Solution: In cordova-plugin-googleplus/plugin.xml - Replace '$PLAY_SERVICES_VERSION' with '+'

@GuidoGagliardini
Copy link

GuidoGagliardini commented May 16, 2023

I managed to correct this error by changing the version of com.google.android.gms:play-services-identity and com.google.android.gms:play-services-auth from 11.8.0 to 11.0.4 in my platforms/android/project.properties

in ionic 5 - Android SDK 33 - Cordova 11 and :

    "cordova-plugin-googleplus": "git+https://github.com/EddyVerbruggen/cordova-plugin-googleplus.git",
    "cordova-plugin-fcm-with-dependecy-updated": "git+https://github.com/marutifh/cordova-plugin-fcm-with-dependecy-updated.git",
      "cordova-plugin-fcm-with-dependecy-updated": {
        "ANDROID_DEFAULT_NOTIFICATION_ICON": "@mipmap/ic_launcher",
        "ANDROID_FIREBASE_BOM_VERSION": "29.0.1",
        "ANDROID_GOOGLE_SERVICES_VERSION": "4.3.4",
        "ANDROID_GRADLE_TOOLS_VERSION": "7.1.3",
        "IOS_FIREBASE_MESSAGING_VERSION": "~> 7.4.0",
        "ANDROID_FCM_VERSION": "23.0.0"
      }

I had to change in platfomrs/android/app/build.gradle


    implementation "com.google.android.gms:play-services-auth:17.0.0"
    implementation "com.google.android.gms:play-services-identity:17.0.0"

for this

    implementation "com.google.android.gms:play-services-auth:17.0.0"
    implementation "com.google.android.gms:play-services-identity:17.0.0"

in project.properties

cordova.system.library.2=com.google.android.gms:play-services-auth:15.0.1
cordova.system.library.3=com.google.android.gms:play-services-identity:15.0.1

for this

cordova.system.library.2=com.google.android.gms:play-services-auth:17.0.0
cordova.system.library.3=com.google.android.gms:play-services-identity:17.0.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests