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

Android - error: cannot find symbol import io.invertase.firebase.analytics.RNFirebaseAnalyticsPackage; #213

Closed
grubstarstar opened this issue Jun 28, 2017 · 5 comments

Comments

@grubstarstar
Copy link

I have followed the Android setup instructions and gone through it a few times now but whenever I do a react-native run-android I get the error attached. The instructions I am following are here:

http://invertase.io/react-native-firebase/#/installation-android

After doing some searching, I have installed 'Google Play SDK' rev 41 as well as 'Google Repository' 54 through the Android SDK Manager, but this hasn't made a difference.

my android/gradle/wrapper/gradle-wrapper.properties has the distributionUrl distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip.

I'm not an Android developer and my knowledge is limited in this area. Is there anything you could advise?

react-native-run-android.txt

@grubstarstar
Copy link
Author

Having looked at the android/src/main/java/io/invertase/firebase/ folder in version 2.0 of 'react-native-firebase' it looks like the documentation at http://invertase.io/react-native-firebase/#/installation-android is written for v2 only, as those packages (RNFirebaseAnalyticsPackage, etc) are not available in v1.

Is there installation documentation for v1?

@Ehesp
Copy link
Member

Ehesp commented Jun 28, 2017

Which version of RNFirebase are you using? It looks like v2?

@andfk
Copy link

andfk commented Jun 28, 2017

V2 is giving lot of issues because of the updates in Firebase libraries I guess. Im trying to install on iOS too and it only compiled correctly if i set the version of Firebase to install by Cocoapods (lower than 4.0.0 initially compiled but didnt tried if it works correctly).
I think until this issue is fixed the docs should reflect this? Otherwise I guess there will come lot of issues opened due this. I´ve been using this library since April and it always worked perfectly except since v2.0.0 due new changes in Firebase Pods thought, but not sure. I´m pretty sure if I test the Android version, it will happen the same?

@Ehesp
Copy link
Member

Ehesp commented Jun 28, 2017

@grubstarstar The logs are showing its trying to include the module packages (e.g. RNFirebaseAnalyticsPackage), which means you are trying to install with v2, not v1.

V1 docs for Android setup are here: https://github.com/invertase/react-native-firebase/blob/77d6fffca03b9f9f4e8853d8e3f4a642839155b5/docs/installation-android.md

With v2, you need to ensure you're including both the Firebase SDK for the modules you need & including the RNFirebase package for that module. Uploading the repo / files here will help.

@grubstarstar
Copy link
Author

@Ehesp thanks, yeah I realised I had v1 installed but was trying to include the sepearate packages as you do in v2. I didn't realise that this documentation was for version 2:

http://invertase.io/react-native-firebase/#/installation-android

I found the other docs in the end for tag v1 in this github repo.

@andfk I also had the issue with v1 where I had to use '<4' in my Podfile. Works well now though.

Thanks for the responses guys.

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