react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

Cannot find symbol RNFirebasePackage

Open sandipbhambre opened this issue 7 years ago • 11 comments

Issue

Describe your issue here


When I am adding React-Native-Firebase to my existing project. Then Build gets Failed with error: Cannot Found Symbol RNFirebasePackage. This problem is occurring due to react-native link react-native-firebase. The link command adds import io.invertase.firebase.RNFirebaseAdMobPackage; instead of import io.invertase.firebase.RNFirebasePackage; and also in protected List getPackages() {...}

Project Files

iOS

Click To Expand

ios/Podfile:

  • [ ] I'm not using Pods
  • [x] I'm using Pods and my Podfile looks like:
# N/A

AppDelegate.m:

// N/A


Android

Click To Expand

Have you converted to AndroidX?

  • [ ] my application is an AndroidX application?
  • [ ] I am using android/gradle.settings jetifier=true for Android compatibility?
  • [ ] I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

 OUTPUT GOES HERE
  • Platform that you're experiencing the issue on:
    • [ ] iOS
    • [ ] Android
    • [ ] iOS but have not tested behavior on Android
    • [ ] Android but have not tested behavior on iOS
    • [ ] Both
  • react-native-firebase version you're using that has this issue:
    • e.g. 5.4.3
  • Firebase module(s) you're using that has the issue:
    • e.g. Instance ID
  • Are you using TypeScript?
    • Y/N


Think react-native-firebase is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]

sandipbhambre avatar Jul 13 '19 08:07 sandipbhambre

Same here ... RN 0.59.10 and RNF 5.3.1 I tried several times but nothing worked ... still researching

robleds avatar Jul 13 '19 22:07 robleds

@robleds i am having the same issue .have you found solution?

muhammadsarim555 avatar Jul 14 '19 11:07 muhammadsarim555

The temporary solution would be In MainApplication.java Replace import io.invertase.firebase.RNFirebaseAdMobPackage; With import io.invertase.firebase.RNFirebasePackage; And Replace new RNFirebaseAdMobPackage(); With new RNFirebasePackage();

sandipbhambre avatar Jul 14 '19 12:07 sandipbhambre

RNFirebasePackage

did not work for me

ravikiran6763 avatar Jul 15 '19 06:07 ravikiran6763

@ravikiran6763: What error did you get?

sandipbhambre avatar Jul 15 '19 08:07 sandipbhambre

@ravikiran6763: What error did you get?

import io.invertase.firebase.RNFirebaseAdMobPackage; ^ symbol: class RNFirebaseAdMobPackage location: package io.invertase.firebase 1 error

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

ravikiran6763 avatar Jul 15 '19 08:07 ravikiran6763

@ravikiran6763 Remove that import and add: import io.invertase.firebase.RNFirebasePackage; and if is in here, also remove it:

@Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(new MainReactPackage(), new RNGestureHandlerPackage(),
          );
    }

sandipbhambre avatar Jul 15 '19 08:07 sandipbhambre

@robleds i am having the same issue .have you found solution?

Yes @muhammadsarim555 ... I did remove iOS and Android folder, clean project cache and did react-native eject and react-native link to start from beginner.

I followed these steps: https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh

I didn't run the script. I just followed each line step by step. Works.

robleds avatar Jul 18 '19 00:07 robleds

Same here. RN v0.59.10 and RNF v5.3.1 this work it should be just a typo

bitlab-code avatar Jul 18 '19 12:07 bitlab-code

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.

stale[bot] avatar Aug 15 '19 13:08 stale[bot]

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.

stale[bot] avatar Aug 30 '19 14:08 stale[bot]