Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio 3.0 migration AAPT2 error

After migrating my existing project to Android Studio 3.0, it is not compiling. Below are the log details:

Error:java.util.concurrent.ExecutionException: 
    java.util.concurrent.ExecutionException: 
com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: 
com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for 
details
Error:Execution failed for task ':app:processDebugResources'.
Failed to execute aapt
Information:BUILD FAILED in 27s
Information:11 errors
Information:0 warnings
like image 349
user8806859 Avatar asked Nov 15 '17 08:11

user8806859


People also ask

How to solve AAPT2 error in Android Studio?

To resolve this error, contact the library author to rebuild the library using the latest version of the Android SDK Build Tools and republish the library.

What is AAPT2?

aapt stands for Android Asset Packaging Tool and is included in the tools/ directory of the SDK. This tool allows you to view, create, and update Zip-compatible archives (zip, jar, apk). It can also compile resources into binary assets.

What is Gradle properties in Android Studio?

Android Studio uses Gradle, an advanced build toolkit, to automate and manage the build process, while allowing you to define flexible custom build configurations. Each build configuration can define its own set of code and resources, while reusing the parts common to all versions of your app.


2 Answers

Go to your gradle.properties write the below code and Sync your project

android.enableAapt2=false

enter image description here

like image 171
Gaurav Singh Avatar answered Oct 21 '22 19:10

Gaurav Singh


Is your username in OS cyrillic? If so - you need to change the .gradle resource folder in settings to path which does not contain cyrillic symbols. In ->Settings-> Build, Execution -> Gradle change Service directory path to "C:/Users/Public/.gradle"

like image 27
Leo240 Avatar answered Oct 21 '22 20:10

Leo240