I'm trying to install react-native-navigation(wix) package, I'm following the steps on android(https://wix.github.io/react-native-navigation/#/installation-android) but in android studio the build fails with the message. Gradle 4.1( I don't know if this is related)
Could not resolve project :react-native-navigation.
Required by:
project :app
Unable to find a matching configuration of project :react-native-navigation: None of the consumable configurations have attributes.
Error:Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :react-native-navigation.
Open File
Show Details
Error:Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve project :react-native-navigation.
Open File
Show Details
Error:Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve project :react-native-navigation.
Open File
Show Details
Error:Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve project :react-native-navigation.
Open File
Show Details
Error:Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve project :react-native-navigation.
I leave the details below(my user is called home, is not a typo):
Issue Description local.properties file
sdk.dir=/home/home/Android/Sdk
settings.gradle
include ':app'
include ':react-native-navigation'
project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation/android/app/')
App gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
defaultConfig {
applicationId "com.example.home.myapplication"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.android.support:appcompat-v7:25.0.1"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
//tried implementation as well here instead of compile but didn't work either
compile project(':react-native-navigation')
}
Environment
- React Native Navigation version: "1.1.370"
- React Native version: "0.52.0"
- Platform(s) (iOS, Android, or both?): Android
- Device info (Simulator/Device? OS version? Debug/Release?): Android Studio
Which version of gradle and android api should I use with react native? Is there any way to solve this? I see that my app gradle file is nothing alike the instructions, that compile project statement is not valid in my version of gradle. Any idea? Maybe the local.settings is wrong and is not finding the files?...Any help would be appreciated