我是 React Native 和 Android 开发的新手。目前我想构建一个APK,但我遇到了这个错误。
**失败:构建因异常而失败。* 出了什么问题:无法确定任务“:app:lintVitalRelease”的依赖关系。
无法解析配置“:app:releaseRuntimeClasspath”的所有任务依赖项。无法解析项目:react-native-cookies。要求者:project :app 无法找到project :react-native-cookies 的匹配配置:所有可使用的配置都没有属性。**
在 build.gradle 文件中
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')
}
Run Code Online (Sandbox Code Playgroud)
在 app/build.gradle 文件中
buildscript {
ext {
buildToolsVersion = "28.0.3" //28.0.3
minSdkVersion = 16
compileSdkVersion = 28 //28
targetSdkVersion = 28
supportLibVersion = …Run Code Online (Sandbox Code Playgroud)