我开始得到这个错误在离子构建...之前现在我的项目执行罚款,再次尝试我得到这个错误...请我需要帮助...我已经尝试了许多选项都无济于事
生成时出错
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.browser:browser:1.4.0.
AAR metadata file: /private/var/root/.gradle/caches/transforms-3/fedb1dfce730f31190923d6e253eb6c6/transformed/browser-1.4.0/META-INF/com/android/build/gradle/aar-metadata.properties.
我正在使用android@10。
我的build.gradle文件看起来像这样
buildscript {
apply from: 'CordovaLib/cordova.gradle'
apply from: 'repositories.gradle'
repositories repos
dependencies {
classpath "com.android.tools.build:gradle:${cordovaConfig.AGP_VERSION}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${cordovaConfig.KOTLIN_VERSION}"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
def hasRepositoriesGradle = file('repositories.gradle').exists()
if (hasRepositoriesGradle) {
apply from: 'repositories.gradle'
} else {
apply from: "${project.rootDir}/repositories.gradle"
}
repositories repos
}
task clean(type: Delete) {
delete rootProject.buildDir
}
1条答案
按热度按时间ut6juiuv1#
通过添加到android/app/build.gradle修复了我的问题