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
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.
Most helpful comment
The error I see in logcat is:
(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.