Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: package android.support.v4.content does not exist import android.support.v4.content.LocalBroadcastManager; #1134

Open
rgaufman opened this issue Apr 10, 2020 · 2 comments

Comments

@rgaufman
Copy link

When I try to build my app, I am getting the following:

/Users/hackeron/Development/Tether/tether-android/node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/MessagingService.java:8: error: package android.support.v4.content does not exist
import android.support.v4.content.LocalBroadcastManager;
                                 ^

When openning an issue, please include following information for better support

  1. react-native-fcm 16.2.4 and react-native 0.61.5
  2. Android Studio 3.6.2 on Mac Catalina
  3. I'm stuck on the build process

Any ideas?

@phatlaunchdeck
Copy link

@rgaufman This library does not support AndroidX yet but React Native 0.61 uses AndroidX so you have to go into the source code (the file that is throwing out the error above), delete that import line and Android Studio will suggest a new import for LocalBroadcastManager that fits AndroidX.

As I remember there're about 4 files need changing.

After done with that, you can either do the following:

  1. Edit the files every time you update your package.json.
  2. Fork the library to your account, edit the files and install the library from your repo's link so you don't have worry about Working only for 1st message. #1.

@Desintegrator
Copy link

you can use my fork which is ready to work with AndroidX https://github.com/Desintegrator/react-native-fcm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants