frostney / react-native-create-library

:notebook: Command line tool to create a React Native library with a single command
MIT License
1.45k stars 113 forks source link

Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. #93

Open kashifaliquazi opened 5 years ago

kashifaliquazi commented 5 years ago

Integrating react-native-create-library giving this error logs:

What went wrong: Could not determine the dependencies of task ':app:preDebugBuild'.

Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. Could not resolve project :react-native-exlr-ar. Required by: project :app Unable to find a matching configuration of project :react-native-exlr-ar: None of the consumable configurations have attributes.

react-native-exlr-ar is the Ntive module I have created and manually copied it in node_modules folder of another react-native app.

followed the manual linking process mentioned in read me

  1. Open up android/app/src/main/java/[...]/MainActivity.java
    • Add import com.reactlibrary.RNExlrArPackage; to the imports at the top of the file
    • Add new RNExlrArPackage() to the list returned by the getPackages() method
  2. Append the following lines to android/settings.gradle:
    include ':react-native-exlr-ar'
    project(':react-native-exlr-ar').projectDir = new File(rootProject.projectDir,  '../node_modules/react-native-exlr-ar/android')
  3. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-exlr-ar') // here I have  used implementation project(':react-native-exlr-ar') instead because compile is obsolete now. 

Current versions:

"react": "16.6.3",
"react-native": "0.57.8",

I have no Idea what I am missing. Need help.