RNFirebase core module was not found natively on Android
https://github.com/invertase/react-native-firebase#supported-versions---react-native--firebase
table shows I've to use 11.6.2 for react-native 0.51
although node_modules/react-native-firebase/android/build.gradle has
buildscript {
ext.firebaseVersion = '11.4.2'
}
Is that a problem?
buildscript {
repositories {
dependencies {
classpath 'com.google.gms:google-services:3.1.2'
}
}
project.ext.react = [
entryFile: "index.js"
]
apply from: "../../node_modules/react-native/react.gradle"
allprojects {
repositories {
maven { url "$rootDir/../node_modules/react-native/android" }
maven {
url 'https://maven.google.com'
}
}
}
dependencies {
compile(project(':react-native-firebase')) {
transitive = false
}
compile "com.google.android.gms:play-services-base:11.6.2"
compile "com.google.firebase:firebase-core:11.6.2"
compile "com.google.firebase:firebase-analytics:11.6.2"
compile "com.facebook.react:react-native:+" // From node_modules
}
apply plugin: 'com.google.gms.google-services'
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNFirebasePackage(),
new AutoHeightWebViewPackage(),
new RNFirebaseAnalyticsPackage()
);
}
@Override
protected String getJSMainModuleName() {
return "index";
}
};
include ':react-native-firebase'
project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android')
ANDROID_BUILD_TARGET_SDK_VERSION=23
ANDROID_BUILD_SDK_VERSION=23
ANDROID_BUILD_TOOLS_VERSION=23.0.1
ANDROID_BUILD_MIN_SDK_VERSION=16
"react": "^16.0.0",
"react-native": "^0.51.0",
"react-native-firebase": "^3.2.0",
I found
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNFirebasePackage(),
new AutoHeightWebViewPackage(),
new RNFirebaseAnalyticsPackage()
);
}
code inside the function never gets executed .. is this normal?
@littlehome-eugene, have you solved this issue? How? I have the same problem with my releasebuld, but not with dev.
RN 0.51, Expo SDK 24.0.0, RNFirebase 3.2.1, Firebase Android SDK 11.8.0
Outside the MainApplication Class, there is another method as 'getPackages()'. You should add the additional packages there if you require them.
It solved the Issue for me.
I hope this helps.
protected List<ReactPackage> getPackages() {
// Add additional packages you require here
// No need to add RnnPackage and MainReactPackage
return Arrays.<ReactPackage>asList(
// eg. new VectorIconsPackage()
new RNFirebasePackage(),
new RNFirebaseDatabasePackage(),
new RNFirebaseAdMobPackage(),
new RNFirebaseAuthPackage()
);
}
I have this issue as well, how did you solve it?
I have same issue. RN + Expo. How to fix this !
I also run to this issue guys, How do I fix this? any help would be much appreciated.. thanks
@littlehome-eugene @dmacmillan @steelx
@OliverTheCoder @steelx please refer https://github.com/invertase/react-native-firebase/issues/738#issuecomment-409482220
Thanks for the quick feedback, I looked at the #738, however i'm running it on android not ios, I even created a new react-native project and followed the instructions for integrating react-native-firebase and also checked out their supported react-native versions but I still get the error: RNFirebase core module was not found natively on android even on the new clean project... what do I do now? @littlehome-eugene
Most helpful comment
I have same issue. RN + Expo. How to fix this !