前言:在导入一个demo出现该问题,问题点是Android studio3.2版本以后,AAPT2 (Android Asset Packaging Tool 2)的源代码就是谷歌的Maven存储库。
要使用AAPT2,请确保构建中有一个谷歌()依赖项
gradle文件如下:
buildscript {
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
google() //新添加的 解决3.2版本aapt问题
}
}