Capacitor: Cordova-plugin-googleplus not working with capacitor

Created on 22 Jan 2019  路  6Comments  路  Source: ionic-team/capacitor

When migrating to ionic 4 using capacitor the Google sign in plug it is not working. Capacitor throws a generic error with no details.

See this thread:
https://github.com/EddyVerbruggen/cordova-plugin-googleplus/issues/567#issuecomment-456312429

To reproduce install ionic 4, capacitor and try the login method.

Thanks

Most helpful comment

The error I see in logcat is:

W/System.err: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf;
W/System.err: at com.google.android.gms.auth.api.Auth.(Unknown Source:0)

(note: when testing plugins, always check logcat as native errors won't appear on the chrome console)

Looks like some conflict with default gms version and some of the Capacitor dependencies (probably firebase)

To force latest versions of play services add this to the App's build.gradle in the dependencies section, after adding this I no longer get that error.

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

All 6 comments

Can you provide a sample project?

The error I see in logcat is:

W/System.err: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf;
W/System.err: at com.google.android.gms.auth.api.Auth.(Unknown Source:0)

(note: when testing plugins, always check logcat as native errors won't appear on the chrome console)

Looks like some conflict with default gms version and some of the Capacitor dependencies (probably firebase)

To force latest versions of play services add this to the App's build.gradle in the dependencies section, after adding this I no longer get that error.

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

Thank you so much

Thank you soooo much!! I've been fighting with this for weeks.

Works for me too, thanks.

Was this page helpful?
0 / 5 - 0 ratings