gpt4 book ai didi

android - 无法确定任务 ':app:lintVitalRelease' 的依赖关系

转载 作者:行者123 更新时间:2023-12-04 23:45:39 24 4
gpt4 key购买 nike

我是 react native 和 android 开发的新手。
目前我想构建一个 APK,但我遇到了这个错误。

**FAILURE:构建失败并出现异常。
* 什么地方出了错:
无法确定任务 ':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.**



在 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')

}

在 app/build.gradle 文件中
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
}
}



我不知道如何解决,因为我多次尝试修改 buildToolsVersion、buildTypes 等。有什么想法可以解决这个问题吗?请帮忙。

最佳答案

请将此添加到您的 构建.gradle

dependencies {
def multidex_version = "2.0.1"
implementation "androidx.multidex:multidex:$multidex_version"
}
并添加这个
  defaultConfig {
multiDexEnabled true
}
这将解决您的问题

关于android - 无法确定任务 ':app:lintVitalRelease' 的依赖关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60942766/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com