Closed syron0 closed 5 years ago
Invites was deprecated by the underlying Firebase SDKs a while back, and in v5.5.x of react-native-firebase we had to remove the API in order to support modern Firebase SDKs - you should have a close look at the changelog for this and other breaking changes introduced in v5.4 -> v5.5 of react-native-firebase https://rnfirebase.io/docs/v5.x.x/releases/v5.5.x#5.5.0 - we will allow breaking change in minor revisions (but not patch revisions) in order to track the SDKs
Issue
Hi everyone, I'm trying to make the latest version (5.5.5) work after I upgraded an existing project to react-native 0.60.4. I'm pretty sure it's just a configuration problem that I can't figure out. Thanks in advance!
I'm getting the following error:
Project Files
iOS
Click To Expand
#### `ios/Podfile`: - [ ] I'm not using Pods - [x] I'm using Pods and my Podfile looks like: ```ruby # N/A ``` #### `AppDelegate.m`: ```objc // N/A ```
Android
Click To Expand
#### `android/build.gradle`: ```groovy buildscript { ext { buildToolsVersion = "28.0.3" minSdkVersion = 16 compileSdkVersion = 28 targetSdkVersion = 26 supportLibVersion = "28.0.0" } repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.4.1' classpath 'com.google.gms:google-services:4.2.0' } } allprojects { repositories { mavenLocal() google() jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" maven { url 'https://maven.google.com' } maven { url "https://jitpack.io" } } } } wrapper { gradleVersion = '5.1.1' distributionUrl = distributionUrl.replace("bin", "all") } ``` #### `android/app/build.gradle`: ```groovy 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 rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { applicationId "com.proj" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1212 versionName "1.2.12" ndk { abiFilters "armeabi-v7a", "x86" } vectorDrawables.useSupportLibrary = true multiDexEnabled true } splits { abi { reset() enable enableSeparateBuildPerCPUArchitecture universalApk false // If true, also generate a universal APK include "armeabi-v7a", "x86" } } signingConfigs { release { if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) { storeFile file(MYAPP_RELEASE_STORE_FILE) storePassword MYAPP_RELEASE_STORE_PASSWORD keyAlias MYAPP_RELEASE_KEY_ALIAS keyPassword MYAPP_RELEASE_KEY_PASSWORD } } } buildTypes { release { minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" signingConfig signingConfigs.release } } // applicationVariants are e.g. debug, release applicationVariants.all { variant -> variant.outputs.each { output -> // For each separate APK per architecture, set a unique version code as described here: // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits def versionCodes = ["armeabi-v7a":1, "x86":2] def abi = output.getFilter(OutputFile.ABI) if (abi != null) { // null for the universal-debug, universal-release variants output.versionCodeOverride = versionCodes.get(abi) * 1048576 + defaultConfig.versionCode } } } } dependencies { implementation 'com.android.support:multidex:1.0.3' implementation fileTree(dir: "libs", include: ["*.jar"]) implementation 'com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}' // For animated GIF support implementation 'com.facebook.fresco:animated-gif:1.10.0' // For WebP support, including animated WebP implementation 'com.facebook.fresco:animated-webp:1.10.0' implementation 'com.facebook.fresco:webpsupport:1.10.0' // For WebP support, without animations implementation 'com.facebook.fresco:webpsupport:1.10.0' // 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-messaging:18.0.0' implementation 'com.google.firebase:firebase-invites:17.0.0' implementation 'me.leolin:ShortcutBadger:1.1.21@aar' } task copyDownloadableDepsToLibs(type: Copy) { from configurations.compile into 'libs' } apply plugin: 'com.google.gms.google-services' ``` #### `android/settings.gradle`: ```groovy rootProject.name = 'ProjName' include ':app' ``` #### `MainApplication.java`: ```java package com.proj; import android.app.Application; import com.facebook.react.ReactApplication; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.react.shell.MainReactPackage; import com.facebook.soloader.SoLoader; /* import io.invertase.firebase.RNFirebasePackage; import io.invertase.firebase.messaging.RNFirebaseMessagingPackage; import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage; */ import java.util.Arrays; import java.util.List; public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } @Override protected List getPackages() {
return Arrays.asList(
new MainReactPackage()/*,
new RNFirebasePackage(),
new RNFirebaseMessagingPackage(),
new RNFirebaseNotificationsPackage() */
);
}
@Override
protected String getJSMainModuleName() {
return "index";
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
}
```
#### `AndroidManifest.xml`:
```xml
```
Environment
Click To Expand
**`react-native info` output:** ``` System: OS: Linux 4.18 Ubuntu 18.10 (Cosmic Cuttlefish) CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz Memory: 226.95 MB / 7.69 GB Shell: 4.4.19 - /bin/bash Binaries: Node: 8.11.4 - /usr/bin/node Yarn: 1.12.3 - /usr/bin/yarn npm: 5.8.0 - /usr/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: Android SDK: API Levels: 16, 25, 26, 27, 28 Build Tools: 26.0.2, 26.0.3, 27.0.2, 27.0.3, 28.0.2, 28.0.3 System Images: android-16 | Intel x86 Atom, android-26 | Intel x86 Atom_64, android-26 | Google Play Intel x86 Atom, android-27 | Intel x86 Atom_64, android-28 | Intel x86 Atom_64 npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.4 => 0.60.4 npmGlobalPackages: react-native-cli: 2.0.1 react-native-git-upgrade: 0.2.7 react-native-init: 0.6.7 ``` - **Platform that you're experiencing the issue on**: - [ ] iOS - [ ] Android - [ ] **iOS** but have not tested behavior on Android - [x] **Android** but have not tested behavior on iOS - [ ] Both - **Are you using `TypeScript`?** - `N`