Beginning with Android Studio 3.2 Canary 11, the source for AAPT2 (Android Asset Packaging Tool 2) is Google’s Maven repository.
To use AAPT2, make sure that you have a google() dependency in your build.gradle file, as shown here:
buildscript {
repositories {
google() // here
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0-alpha12'
}
}
allprojects {
repositories {
google() // and here
jcenter()
}
}
The new version of AAPT2 fixes many issues, including improved handling of non-ASCII characters on Windows.
Adding the repositories in the buildscript
is not sufficient, you need to add it also in allprojects
.
Source: https://developer.android.com/studio/releases/#aapt2_gmaven