【可能有点用的记录】Android Studio 3.2.1更新(2)

前几天更新到3.2.1
打开原来的项目报了个奇怪的错

Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1).
Searched in the following locations:
    https://jcenter.bintray.com/com/android/tools/build/aapt2-proto/0.3.1/aapt2-proto-0.3.1.jar

点开链接看一下

{
  "errors" : [ {
    "status" : 404,
    "message" : "Could not find resource"
  } ]
}

错误详情

在这里插入图片描述

解决方法

google()上位!
下面是原来的代码

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath "com.tencent.bugly:tinker-support:1.1.2"
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url "https://jitpack.io"
        }
    }
}

需要把 google() 移到 jcenter() 前

buildscript {
    repositories {
        google()
        jcenter()
  .....
}

参考博客:来自 小生不得无礼-------Could not find aapt2-proto.jar
没有解决? 看一下Github的贴子

猜你喜欢

转载自blog.csdn.net/UIChi/article/details/83412377
今日推荐