Closed johnsw closed 5 years ago
Ran into the similar issue today and I think I figured it out: Google released a new version of the Firebase SDK yesterday with breaking changes:
https://firebase.google.com/support/release-notes/android#update_-_june_17_2019
This release is a MAJOR version update and includes breaking changes. With this release, libraries are migrated from the Android Support Libraries to the Jetpack (AndroidX) Libraries. The updated libraries will not work unless you make the following changes in your app: Upgrade com.android.tools.build:gradle to v3.2.1 or later. Upgrade compileSdkVersion to 28 or later. Update your app to use Jetpack (AndroidX); follow the instructions in Migrating to AndroidX.
The problem is that cordova-plugin-firebase-lib does not point to a specific version of the Firebase SDK in /src/android/build.gradle
So once I changed in platforms/android/cordova-plugin-firebase-lib/app-build.gradle:
compile` 'com.google.firebase:firebase-auth:+'
to
compile 'com.google.firebase:firebase-auth:17.+'
And set the other dependencies in my platforms/android/project.properties from
cordova.system.library.1=com.google.android.gms:play-services-tagmanager:+
cordova.system.library.2=com.google.firebase:firebase-core:+
cordova.system.library.3=com.google.firebase:firebase-messaging:+
cordova.system.library.4=com.google.firebase:firebase-config:+
cordova.system.library.5=com.google.firebase:firebase-perf:+
to
cordova.system.library.1=com.google.android.gms:play-services-tagmanager:16.+
cordova.system.library.2=com.google.firebase:firebase-core:16.+
cordova.system.library.3=com.google.firebase:firebase-messaging:18.+
cordova.system.library.4=com.google.firebase:firebase-config:17.+
cordova.system.library.5=com.google.firebase:firebase-perf:17.+
It was working again.
@maximilianloy For me on a clean cordova android 8.0 project it is still complaining about these
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
error: cannot find symbol class NotificationCompat error: cannot find symbol class NotificationManagerCompat
We need to find a solution for the plugin to adopt that doesn't require people to manually make changes inside the android platform code, because it will have to be remade each time the platform is readded.
Ran into the similar issue today and I think I figured it out: Google released a new version of the Firebase SDK yesterday with breaking changes:
https://firebase.google.com/support/release-notes/android#update_-_june_17_2019
This release is a MAJOR version update and includes breaking changes. With this release, libraries are migrated from the Android Support Libraries to the Jetpack (AndroidX) Libraries. The updated libraries will not work unless you make the following changes in your app: Upgrade com.android.tools.build:gradle to v3.2.1 or later. Upgrade compileSdkVersion to 28 or later. Update your app to use Jetpack (AndroidX); follow the instructions in Migrating to AndroidX.
The problem is that cordova-plugin-firebase-lib does not point to a specific version of the Firebase SDK in /src/android/build.gradle
So once I changed in platforms/android/cordova-plugin-firebase-lib/app-build.gradle:
compile` 'com.google.firebase:firebase-auth:+'
to
compile 'com.google.firebase:firebase-auth:17.+'
And set the other dependencies in my platforms/android/project.properties from
cordova.system.library.1=com.google.android.gms:play-services-tagmanager:+ cordova.system.library.2=com.google.firebase:firebase-core:+ cordova.system.library.3=com.google.firebase:firebase-messaging:+ cordova.system.library.4=com.google.firebase:firebase-config:+ cordova.system.library.5=com.google.firebase:firebase-perf:+
to
cordova.system.library.1=com.google.android.gms:play-services-tagmanager:16.+ cordova.system.library.2=com.google.firebase:firebase-core:16.+ cordova.system.library.3=com.google.firebase:firebase-messaging:18.+ cordova.system.library.4=com.google.firebase:firebase-config:17.+ cordova.system.library.5=com.google.firebase:firebase-perf:17.+
It was working again.
Could you perhaps make a PR for that? It seemed to work
We are working on it.
@maximilianloy @PrinceCornNM comments on this https://github.com/wizpanda/cordova-plugin-firebase-lib/pull/13
Released v3.3.0 to support cordova-android 7.x.x
. https://github.com/wizpanda/cordova-plugin-firebase-lib/pull/14#issuecomment-503499409
Hello,
I have an ionic v3 application and I am trying to implement firebase analytics to it.
I have installed the plugin but I cannot seem to get it to work. I've tried adding both
cordova-android-play-services-gradle-release
and/orcordova-android-firebase-gradle-release
, with no luck.I have installed this plugin and npm install
@ionic-native/firebase@4
as stated on the v3 ionic docs. On Friday, after a long time struggling, I had managed to make the plugin work, and even logged some events on my firebase account, but this morning, without me having touched the code or anything at all, it wasn't working.If I remove the plugin the application runs smoothly. What I am doing is run
ionic cordova run android -l
and I get the following error:Error
Ionic Info:
Cordova:
System:
Plugins
Project Properties
build.gradle
Additional context I have tried various solutions I found online and on StackOverflow but nothing seems to solve my problem. I hope the info I gave you is sufficient. If not I will provide you with whatever you might need in order to help me.