Reputation: 103
I am new in react native and android development. Currently I want to build an APK but I faced this error.
**FAILURE: Build failed with an exception. * What went wrong: Could not determine the dependencies of task ':app:lintVitalRelease'.
Could not resolve all task dependencies for configuration ':app:releaseRuntimeClasspath'. Could not resolve project :react-native-cookies. Required by: project :app Unable to find a matching configuration of project :react-native-cookies: None of the consumable configurations have attributes.**
In build.gradle file
release {
signingConfig signingConfigs.release
matchingFallbacks = ['release', 'debug']
}
}
dependencies {
implementation project(':react-native-cookies')
implementation project(':react-native-clear-app-cache')
implementation project(':react-native-vector-icons')
implementation project(':react-native-image-picker')
implementation project(':react-native-linear-gradient')
implementation project(':react-native-gesture-handler')
implementation project(':react-native-reanimated')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation project(':react-native-orientation')
}
In app/build.gradle file
buildscript {
ext {
buildToolsVersion = "28.0.3" //28.0.3
minSdkVersion = 16
compileSdkVersion = 28 //28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
I dont know how to solve as I tried many times to modified buildToolsVersion, buildTypes and so on. Any idea to solve this issue? Please help.
Upvotes: 9
Views: 23201
Reputation: 109
Check this out
dependencies {
testImplementation 'junit:junit:4.+'
}
in your build:gradle (module)
Upvotes: 1
Reputation:
Please Add This into your Build.gradle
dependencies {
def multidex_version = "2.0.1"
implementation "androidx.multidex:multidex:$multidex_version"
}
and Also Add This
defaultConfig {
multiDexEnabled true
}
This will solve your issue
Upvotes: 1
Reputation: 5
In android/app/build.gradle
replace:
...
androidTestImplementation 'androidx.test:runner:1.2.1' // old
androidTestImplementation 'androidx.test:runner:1.3.0-alpha03' // new
...
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.1' // old
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha03' // new
...
Upvotes: -2