joshuapinter / react-native-unified-contacts

Your best friend when working with the latest and greatest Contacts Framework in iOS 9+ in React Native.
MIT License
158 stars 56 forks source link

[Android] - Unable to add to project ("Unable to resolve dependency...") #76

Closed mcconkiee closed 6 years ago

mcconkiee commented 6 years ago

In trying to implement the module in an Android project per the README.md, I am unable to get studio (or gradle) to properly use the project. I did notice that unlike other modules, the directory shows up empty

rn

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

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

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

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

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

I tried cleaning the project, and then received

Unable to find a matching configuration of project :react-native-unified-contacts: None of the consumable configurations have attributes.

Let me know what else you need about my project to help debug this issue.

paintedbicycle commented 6 years ago

Hey @mcconkiee

  1. Have you installed the library using npm, pulling from master instead of a specific version - as outlined in #75 ?
  2. Did you double check the Android install instructions in the readme? Including the two build.grade files as well as the settings.gradle and the MainActivity.java?

If so, use Invalidate Caches in Android Studio and then do a complete clean and rebuild.

I've reinstalled the module several times a day for the past few weeks and install seems to go fine. If you're still having trouble, please post the relevant parts of your package.json, MainActivity.java, both build.gradle files and settings.gradle

Paul

mcconkiee commented 6 years ago

wow - ok #75 solved that!!! THANKS

paintedbicycle commented 6 years ago

Glad to hear it @mcconkiee.

Keep in mind that with the setup from #75, every time you run npm install, you will get updated code from this repo that may not be stable. Once we release a new version on npm, you should switch to using specific version numbers instead. But sounds like you're good to go for now!