1

I am having this error in my application development. i have tried many solution but not getting the result. Here is the error:

null    
java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details   
com.android.build.gradle.tasks.ResourceException: Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details  
Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details    
java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details  
java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details   
com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details    
Raj
  • 2,997
  • 2
  • 12
  • 30
  • 1
    Can you go to the project's directory (or to the Terminal window in Android Studio) and run "gradlew clean assembleDebug" and post the output here? – Izabela Orlowska Jul 16 '18 at 09:40

1 Answers1

0

I was facing the same issues and after a lot of research this is what I found. Sometimes the problem is in the XML files when you're referring to a resource that Android Studio doesn't know where to find. In my case I was trying to set the color of an item using android:background="?attr/colorPrimary" instead of android:background="@color/colorPrimary".

Also, in some cases if you're trying to get the dimension of the action bar like so android:height="?attr/actionBarSize" it will result in the exception you mentioned. To get rid of it you should use android:height="?android:attr/actionBarSize". So make sure to check all recently modified XML files for these types of mistakes.