Aid19801
Aid19801

Reputation: 1166

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :react-native-firebase

i'm on Android Studio with an React Native project. Works fine on Xcode but A/S side i get a bunch of errors i'm not familiar with:-

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :react-native-firebase.

Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve project :react-native-firebase.


Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve project :react-native-firebase.


Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve project :react-native-firebase.


Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve project :react-native-firebase.

Assume i need to run the equivalent of an npm install somewhere? Or add in React Native Firebase somewhere? or remove it?

Bizarrely React Native Firebase is NOT in my pkg json dependencies at all. I just use the web api for that - it only exists in Android Studio.

Help?

Upvotes: 3

Views: 3889

Answers (2)

Avindu Hewa
Avindu Hewa

Reputation: 1788

I faced the same issue and found out the cause is a version mismatch. I had my firebase version upgraded to a high level and my react-native version was too low for the package to work.

upgrading react-native itself solved the issue.

Upvotes: 0

Kai
Kai

Reputation: 2599

Sounds like you've answered your own question. You need to npm install it, and then either react-native link it or manually add it to your settings.gradle, app/build.gradle, and MainApplication class. Have a look at the official setup guide.

Upvotes: 1

Related Questions