微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

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

我在 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' }

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。