Description of the problem:
Using https://www.npmjs.com/package/cordova-plugin-google-analytics plugin causes app crash.
Affected platform
OS of the development machine
Other information:
Maybe it is related to https://github.com/ionic-team/capacitor/issues/1142 but not sure what to change to make it work with google analytics.
Capacitor version: 1.0.0-beta.24
Steps to reproduce:
1) Add "cordova-plugin-google-analytics": "^1.8.6", plugin
2) Just register analytics
window.analytics.startTrackerWithId(AppConst.gaIdMobile);
3) It throws error

Can you provide a sample app?
Here it is.
Just run the application on android. It will try to register analytics from main.js and it will just throw the error.
It's because the analytics plugin uses an old play-services-analytics version.
I got it working by adding this to the app's build.gradle file in the dependencies section to force it to use latest version:
implementation "com.google.android.gms:play-services-analytics:16.0.8"
Most helpful comment
It's because the analytics plugin uses an old
play-services-analyticsversion.I got it working by adding this to the app's build.gradle file in the dependencies section to force it to use latest version:
implementation "com.google.android.gms:play-services-analytics:16.0.8"