Class Extending Firebasemessagingservice Not Working Inside Android Library
I created an Android Library to implement FCM to use in my internal projects, where I implement a class to extend FirebaseMessagingService (.services.MyFirebaseMessagingService ) a
Solution 1:
For FCM follow this step : 1 - in main Build.gradle (not in app folder) add this line :
buildscript {
// ...
dependencies {
// ...
classpath 'com.google.gms:google-services:3.0.0'
}
2- in app/build.gradle add this line :
apply plugin: 'com.android.application'
android {
// ...
}
dependencies {
// ...
compile 'com.google.firebase:firebase-core:9.8.0'
compile 'com.google.firebase:firebase-messaging:9.8.0'// Getting a "Could not find" error? Make sure you have// the latest Google Repository in the Android SDK manager
}
// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'
Note : "Android Support Repository" in you SDk most be updated . Hope this help
Solution 2:
click on Build - > Clean then install & run the app
Post a Comment for "Class Extending Firebasemessagingservice Not Working Inside Android Library"