Closed Dwayne01 closed 4 years ago
Same on my side. It happens to me with react-native 0.60.3. This line is what makes the app crashing:
implementation 'com.google.firebase:firebase-messaging:17.3.4'
If I remove it, my app doesn't crash anymore (but I don't have messaging anymore obviously).
Same here. This configuration was working for quite some time already, but now it crashes. My deps:
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation "com.google.firebase:firebase-messaging:17.4.0"
implementation "com.google.firebase:firebase-config:17.0.0"
Seems like https://github.com/invertase/react-native-firebase/issues/1420 again but for slightly newer environment react-native-firebase
5.2.2 here.
Same here...
Unable to instantiate service io.invertase.firebase.messaging.RNFirebaseInstanceIdService
Dependencies:
implementation "com.google.firebase:firebase-core:16.0.8" implementation "com.google.firebase:firebase-messaging:17.5.0"
I have the same problem I found that uncomment these code below on AndroidManifest.xml solve my problem
`
</service>`
Seems like it doesn't fully support autolinking yet. with react native 0.60.4 what works for me is to link it like this in MainApplication.java:
import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;
import io.invertase.firebase.links.RNFirebaseLinksPackage;
import io.invertase.firebase.config.RNFirebaseRemoteConfigPackage;
import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;
....
@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for
// example:
packages.add(new RNFirebaseMessagingPackage());
packages.add(new RNFirebaseLinksPackage());
packages.add(new RNFirebaseRemoteConfigPackage());
packages.add(new RNFirebaseNotificationsPackage());
return packages;
}
in build.gradle:
dependencies {
// This should be here already
implementation project(':react-native-firebase')
// Firebase dependencies
implementation "com.google.android.gms:play-services-base:16.1.0"
implementation "com.google.firebase:firebase-core:16.0.9"
implementation "com.google.firebase:firebase-config:17.0.0"
implementation "com.google.firebase:firebase-invites:17.0.0"
implementation "com.google.firebase:firebase-messaging:18.0.0"
implementation 'me.leolin:ShortcutBadger:1.1.21@aar'
Hello š, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.
My app crashes on first launch and works normally aftwerwards, ive tried using adb logcat to see what errors are logging but it shows nothinh. This happens when i to integrate firebase cloud messaging.
Project Files
android/build.gradle ` buildscript { ext { buildToolsVersion = "28.0.0" minSdkVersion = 19 compileSdkVersion = 28 targetSdkVersion = 28 supportLibVersion = "28.0.0" // googlePlayServicesVersion = "11.8.0" googlePlayServicesVersion = "16.+" firebaseVersion = "17.3.4"
}
allprojects { repositories { mavenLocal() google() jcenter() maven { url "$rootDir/../node_modules/react-native/android" } maven { url 'https://maven.google.com/' } } }
subprojects { project.configurations.all { resolutionStrategy.eachDependency { details -> if (!details.requested.name.contains('multidex')) { if (details.requested.group == 'com.android.support') { details.useVersion "27.0.0" }
} configurations.all { resolutionStrategy { force 'com.android.support:support-v4:27.1.0' }}`
android/app/build.gradle ` apply plugin: "com.android.application"
import com.android.build.OutputFile
project.ext.react = [ entryFile: "index.js" ]
apply from: "../../node_modules/react-native/react.gradle"
def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false
android { compileSdkVersion 28 buildToolsVersion "28.0.0"
}
dependencies { implementation project(':react-native-locale') implementation project(':react-native-get-sms-android') implementation project(':react-native-call-log') implementation project(':react-native-paystack') implementation project(':react-native-config') implementation project(':react-native-camera') implementation project(':@react-native-community_async-storage') implementation project(':react-native-gesture-handler') implementation project(':react-native-camera') implementation project(':react-native-vector-icons') implementation project(':rn-fetch-blob') implementation project(':react-native-file-picker') implementation project(':react-native-linear-gradient') implementation project(':react-native-splash-screen') implementation fileTree(dir: "libs", include: ["*.jar"]) 'com.android.support:appcompat-v7:27.1.0' implementation "com.facebook.react:react-native:+" // From node_modules implementation project(':react-native-firebase') implementation 'com.android.support:multidex:1.0.3' implementation "com.google.android.gms:play-services-base:16.1.0" implementation "com.google.firebase:firebase-core:16.0.9" implementation 'me.leolin:ShortcutBadger:1.1.21@aar' implementation 'com.google.firebase:firebase-messaging:17.3.4'
}
task copyDownloadableDepsToLibs(type: Copy) { from configurations.compile into 'libs' }
apply plugin: 'com.google.gms.google-services' com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true`
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.quickcredit.android" xmlns:tools="http://schemas.android.com/tools">
`