Open beckyhilton opened 4 years ago
+1
+1
I commented out the line: com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
And it seemed to work. Not 100% sure what it does yet - still looking around. However found the following reason as to why it might be breaking - taken from https://github.com/OneSignal/OneSignal-Gradle-Plugin/issues/37
Starting with com.google.gms:google-services:4.3.0 you must now instead add the following to the bottom of your app/build.gradle, after the apply.
googleServices { disableVersionCheck = true } This also works with previous version of com.google.gms:google-services.
I tried some of those changes and then I think I ran into some other issues with duplicate code or something. I'm not sure I tried like 4 different ways to get some sort of firebase analytics working and I still haven't been successful yet
After commenting out the 'disableVersionCheck', and building the app, I got the following errors:
Looks similar to what you got? If so, here's what I had to do to get it working. In the capacitor-firebase-analytics build.gradle file, I upped the following dependencies, com.google.gms:google-services:4.3.3 com.google.firebase:firebase-core:17.4.3
That sorted the duplicate class issue, but introduced one more issue. I'm using Capacitor 2.0.0+, which uses Android X, however this plugin doesn't use it yet. So I did the following:
npm install jetifier
npx jetifier
ionic cap sync
Built the app again, and it worked. See here for info on AndroidX Hope this helps.
Sorrry, but where is the flag "com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true" to commenting out?
tanks
@Paulovsr - sorry, only seeing this now - after you do your ionic cap sync, it should be in your capacitor-firebase-analytics build.gradle file (...\app\node_modules\capacitor-firebase-analytics\android\capacitor-firebase-analytics).
That being said, I watched some of the Ioniconf during the week, and it pointed me to the new list of 'community-supported' plugins. Since this plugin is not really being updated anymore, perhaps its a good idea to try this one out: https://github.com/capacitor-community/firebase-analytics.
I'll see if I can test it out sometime next week, and post back here if I experienced a smoother experience :)
I'm getting a build failure after the initial setup of the plugin
FAILURE: Build failed with an exception.
Where: Build file '/builds/beckyhilton/ionic-vairkko/node_modules/capacitor-firebase-analytics/android/capacitor-firebase-analytics/build.gradle' line: 54
What went wrong: A problem occurred evaluating project ':capacitor-firebase-analytics'.
this is the line it doesn't like: com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true