Android AAPT2 error: check logs for details [How to Solve]

AAPT is the full name of Android asset packaging tool. It is an indispensable tool to build app and even Android system. Its function is to compress and package all resource files into Android APK. We can find it in the Android SDK directory.

Aapt2 is a new version of AAPT. Starting from Android studio 3.0, it is used as the default resource packaging tool.

After upgrading Android studio 3.0, a number of old projects will appear. According to the online version, the following code is added to gradle.properties

android.enableAapt2=false

This method can solve some people’s problems, but some people can’t

I’m changing the API version. OK

Of course, it can also be caused by resource name, layout reference, layout ID reference, etc

Of course, you can also upgrade the as version

Similar Posts: