android - 无法解析 Android 应用程序模块的 Gradle 配置。解决 gradle 构建问题和/或重新同步。如何在北极狐 Updt 中解决此问题
问题描述
我在 android studio arctic fox update 中面临这个问题。这是我的 gradle 文件
第一
// 顶级构建文件,您可以在其中添加所有子项目/模块通用的配置选项。buildscript { 存储库 { google() mavenCentral() } 依赖项 { 类路径“com.android.tools.build:gradle:7.0.0”}
}
任务清理(类型:删除){删除rootProject.buildDir}
第二个
插件 { id 'com.android.application' }
安卓 { compileSdk 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' } } compileOptions { 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' }
解决方案
推荐阅读
- angular - 如何在没有附加组件的情况下在多个地方重用 HTML
- javascript - 解析 RSS 提要信息并显示在 HTML 页面上
- cassandra - Cassandra插入值消失
- c++ - 如果任何列中都不需要图像/图标,MFC CListCtrl 是否合适?
- python-3.x - Python 代码在行中使用 3 次时交换 csv 列(连续 3 天)
- c# - 如何修复我的 c# 二进制搜索算法?
- visual-studio-2015 - Visual Studio 2017/IIS Express:无法连接到已配置的开发 Web 服务器
- api - 如何验证 Analytics 360 是否与 BigQuery 成功关联?
- regex - 使用 4 个或更少 OR 语句的数字 -25 到 1045 的正则表达式
- regex - 使用 RegEx 匹配带有和不带有转义字符的字符串