无法解析 Android 应用程序模块的 Gradle 配置。解决 gradle 构建问题和/或重新同步。我如何在北极狐 Updt 中解决这个问题

时间:2021-08-01 17:25:13

标签: android gradle

我在 android studio arctic fox 更新中遇到了这个问题..这是我的 gradle 文件

第一个

<块引用>

// 顶级构建文件,您可以在其中添加常见的配置选项 到所有子项目/模块。构建脚本{ 存储库{ 谷歌() MavenCentral() } 依赖{ 类路径“com.android.tools.build:gradle:7.0.0” }

}

任务清理(类型:删除){ 删除 rootProject.buildDir }

第二个

<块引用>

插件{ id 'com.android.application' }

安卓{ 编译SDK 31

defaultConfig {
    applicationId "com.mobilelegends.whatsapp"
    minSdk 21
    targetSdk 31
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),

'proguard-rules.pro' } } 编译选项{ sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } }

依赖项{

implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' }

0 个答案:

没有答案