我正在从Udacity建立一个示例项目.到目前为止工作正常,但升级到Android Studio 3.2.1后,我面临下面的构建错误.
Gradle版本:4.6
项目链接:https://github.com/udacity/ud851-Sunshine/tree/student/S02.02-Solution-Menus
Could not find com.androID.tools.build:aapt2:3.2.1-4818971**. Searched in the following locations: file:/C:/Users/sandeepk2/AppData/Local/AndroID/Sdk/extras/m2repository/com/androID/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971.pom file:/C:/Users/sandeepk2/AppData/Local/AndroID/Sdk/extras/m2repository/com/androID/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971-windows.jar file:/C:/Users/sandeepk2/AppData/Local/AndroID/Sdk/extras/Google/m2repository/com/androID/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971.pom file:/C:/Users/sandeepk2/AppData/Local/AndroID/Sdk/extras/Google/m2repository/com/androID/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971-windows.jar file:/C:/Users/sandeepk2/AppData/Local/AndroID/Sdk/extras/androID/m2repository/com/androID/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971.pom file:/C:/Users/sandeepk2/AppData/Local/AndroID/Sdk/extras/androID/m2repository/com/androID/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971-windows.jar https://jcenter.bintray.com/com/androID/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971.pom https://jcenter.bintray.com/com/androID/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971-windows.jar required by: project :app
我该如何解决?
解决方法:
适用于AndroID Studio 3.2.1更新
只需在根级build.gradle中添加Google()即可
buildscript { repositorIEs { Google() // <--here jcenter() } }allprojects { repositorIEs { Google() // <-- here jcenter() }}
并看到魔术 – 错误消失了.
总结以上是内存溢出为你收集整理的在Android Studio 3.2.1升级后构建错误全部内容,希望文章能够帮你解决在Android Studio 3.2.1升级后构建错误所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)