android - 在 Android Studio 中找不到 aapt2-4.1.3-6503028-windows.jar
问题描述
我正在准备在 android studio 中运行我的应用程序,但出现此错误:
Execution failed for task ':app:mergeDebugResources'.
> Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
> Could not find aapt2-4.1.3-6503028-windows.jar (com.android.tools.build:aapt2:4.1.3-6503028).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/4.1.3-6503028/aapt2-4.1.3-6503028-windows.jar
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
我的 build.gradle 是:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我尝试切换离线模式,但我有同样的错误。我可以从错误中的链接手动下载它,但在 android studio 中不能
解决方案
推荐阅读
- nao-robot - NAO机器人交叉编译/Naoqi OS
- gulp - gulp 添加管道以转换为 Vinyl 对象
- windows - kafka.zookeeper.ZooKeeperClientTimeoutException:在状态下等待连接超时:Windows 上的 CONNECTING
- nlp - deeppavlov 模型火车没有找到模块
- css - 为什么居中我的 div 会阻止它占用可用的最大宽度?
- java - vector.add() 返回垃圾值 - Java
- java - 不支持 CONNECT 请求
- python - 当我的启动脚本与 VM 实例一起运行时,出现“net/url:URL 中的无效控制字符”错误
- python-3.x - 等待套接字连接的一定时间
- java - Akka 打字比 Classic 慢