Android Studio 3.2 Canary14 Clean-Rebuild失败:找不到aapt2:3.2.0-alpha14-4748712
Hey fellow dev, I’ve run into this exact issue before—here’s how to fix it quickly:
What’s the root cause?
Starting with Android Studio 3.2, Google moved the AAPT2 tool (which handles Android resource processing) out of the old SDK extras repositories and into the Google Maven Repository. Your build is failing because it’s only searching the outdated locations (like local SDK extras folders and jcenter) that don’t host this alpha version of AAPT2.
Step-by-Step Fix
- Open the root-level
build.gradlefile of your project (not the one inside theappmodule). - Find the
allprojects > repositoriesblock in this file. - Add the
google()repository entry—list it before other repositories like jcenter to ensure priority:
allprojects { repositories { google() // This is the missing line in your build setup jcenter() // Add any other repositories you use here (e.g., mavenCentral) } }
For older Gradle versions (just in case):
If you’re using a Gradle plugin version older than 4.0 (unlikely for Android Studio 3.2 Canary, but worth noting), replace google() with the full Maven URL:
maven { url 'https://maven.google.com' }
- Click the "Sync Now" prompt that appears to sync your project with the updated Gradle configuration.
- Run Clean > Rebuild again—this should resolve the missing AAPT2 dependency error.
Why this works
The google() repository hosts all the latest Android build tools, including alpha/beta versions of AAPT2 that aren’t available in the old SDK extras folders or jcenter. Adding it tells your build system to look in the correct, up-to-date location for the required files.
内容的提问来源于stack exchange,提问作者Arunabh Das




