After updating Android Studio, I get this error when building project:
and this:
How can I solve this problem?
After updating Android Studio, I get this error when building project:
and this:
How can I solve this problem?
Update your android Gradle plugin version in your build.gradle file to 3.2.0-alpha11 or newer it all compiles fine:
classpath 'com.android.tools.build:gradle:3.2.0-alpha11'
You can either disable AAPT2 by setting android.enableAapt2=false
in gradle.properties
.
Or use 'com.android.tools.build:gradle:3.2.0-alpha11'
or latest version.
More details: Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
If you have recently changed your namespace 'com.yourcompany.yourappname' and your current import to your resources 'com.yourcompany.your_app_name.R' doesn't match would also cause this error.
Make sure your namespace matches your imports