gpt4 book ai didi

Android Studio 3.2 - 找不到 com.android.tools.build :aapt2:3. 2.0-4818971

转载 作者:IT王子 更新时间:2023-10-28 23:51:17 28 4
gpt4 key购买 nike

我正在按照教程为 android 开发图标包,当我导入项目时遇到了几个错误,在这里得到了解决 - Gradle Version 4.6 - Absolute path are not supported when setting an output file name

解决该错误后,弹出以下错误。

Could not find com.android.tools.build:aapt2:3.2.0-4818971.
Searched in the following locations:

file:/C:/Users/Tomin Jacob/AppData/Local/Android/Sdk/extras/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971.pom

file:/C:/Users/Tomin Jacob/AppData/Local/Android/Sdk/extras/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971-windows.jar

file:/C:/Users/Tomin Jacob/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971.pom

file:/C:/Users/Tomin Jacob/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971-windows.jar

file:/C:/Users/Tomin Jacob/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971.pom

file:/C:/Users/Tomin Jacob/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971-windows.jar

https://jcenter.bintray.com/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971.pom

https://jcenter.bintray.com/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971-windows.jar

https://jitpack.io/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971.pom

https://jitpack.io/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971-windows.jar
Required by:
project :licensing

我尝试打开 URL,并且能够从前 2 个 URL 下载 JAR (aapt2-3.2.0-4818971-windows.jar) 和 JSON (aapt2-3.2.0-4818971.pom.json) 文件.我应该将这些文件复制到某处吗?我应该怎么做才能解决这个错误?

最佳答案

您的项目的 build.gradle 文件中很可能没有 Google 存储库。在两个位置添加 google(),如下所示:

buildscript {

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
}
}

allprojects {
repositories {
google()
jcenter()
}
}

关于Android Studio 3.2 - 找不到 com.android.tools.build :aapt2:3. 2.0-4818971,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52541525/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com