This package breaks android build with react-native 0.64.1 - FirebaseInstanceId seems to no longer be supported
See original GitHub issueBug
When I run yarn android
I get this error:
C:\Users\____\github\rnfPushRepro\node_modules\react-native-push-notification\android\src\main\java\com\dieam\reactnativepushnotification\modules\RNPushNotification.java:39: error: cannot find symbol
import com.google.firebase.iid.FirebaseInstanceId;
symbol: class FirebaseInstanceId
location: package com.google.firebase.iid
There are numerous of these errors.
It appears as though the issue is that FirebaseInstanceId has been deprecated
Environment info
System:
OS: Windows 10 10.0.19041
CPU: (16) x64 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
Memory: 35.20 GB / 63.74 GB
Binaries:
Node: 14.15.3 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.9 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 23, 28, 29, 30
Build Tools: 28.0.3, 29.0.2, 30.0.2
System Images: android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom,
android-30 | Google Play Intel x86 Atom
Android NDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Version 4.1.0.0 AI-201.8743.12.41.6953283
Visual Studio: Not Found
Languages:
Java: 15.0.1 - C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.1 => 0.64.1
react-native-windows: Not Found
npmGlobalPackages:
*react-native*: Not Found
Library version: 7.2.3
Steps To Reproduce
npx react-native init MyApp
cd MyApp
yarn add react-native-push-notification
yarn android
Reproducible sample code
example repro here: https://github.com/goleary/rnfPushRepro
Issue Analytics
- State:
- Created 2 years ago
- Reactions:16
- Comments:10
Top Results From Across the Web
React native firebase - android not able to build - Stack Overflow
just add the following under android/build.gradle buildscript { ext { ..... firebaseMessagingVersion = "21.1.0" }.
Read more >firebaseinstanceid not found android - You.com | The search ...
zo0r/react-native-push-notificationThis package breaks android build with react-native 0.64.1 - FirebaseInstanceId seems to no longer be supported#1981.
Read more >react-native-svg - npm
react-native -svg provides SVG support to React Native on iOS, Android, macOS, Windows, and a compatibility layer for the web.
Read more >Using Hermes in React Native - LogRocket Blog
Hermes support for Android has been active for a while. With the opt-in support for iOS in React Native 0.64, you can now...
Read more >Installation | React Native Reanimated - Software Mansion
Reanimated 2 is primarily built in C++ using Turbo Modules infrastructure which is not yet completely deployed in React Native (specifically on Android)....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In app build.gradle: implementation ‘com.google.firebase:firebase-messaging:21.1.0’
in android build.gradle: ext { firebaseMessagingVersion = “21.1.0” buildToolsVersion = “29.0.2” minSdkVersion = 24 compileSdkVersion = 29 targetSdkVersion = 29 }
All I had to do was update
android/build.gradle
to lock the version offirebase-messaging