Error com android tools aapt2 Aapt2Exception AAPT2 error check logs for details

0 votes

This is the output of my Gradle console, I am unable to build my project

D:\Android Projects\....\app\src\main\res\layout\topic_view_header.xml
Error:error: resource attr/?? (aka -packagename- :attr/??) not found.
Error:error: resource attr/?? (aka -packagename-:attr/??) not found.
Error:error: resource attr/?? (aka -packagename-:attr/??) not found.
Error:resource attr/?? (aka -packagename-:attr/??) not found.
Error:resource attr/?? (aka -packagename-:attr/??) not found.
Error:resource attr/?? (aka -packagename-:attr/??) not found.
Error:failed linking file resources.
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
Jun 20 in Others by polo
• 1,500 points
9 views

1 answer to this question.

0 votes

Please be aware that AAPT1might be removed in the future therefore you are forced to use AAPT2. Actually the migration guide isn't hard to follow since you don't see that much changes at the same time this way is future proof.

Element hierarchies in the Android manifest

In previous versions of AAPT, elements nested in incorrect nodes in the Android manifest are either ignored or result in a warning. For example, consider the following sample:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
   package="com.example.myname.myapplication">
   <application
       ...
       <activity android:name=".MainActivity">
           <intent-filter>
               <action android:name="android.intent.action.MAIN" />
               <category android:name="android.intent.category.LAUNCHER" />
           </intent-filter>
           <action android:name="android.intent.action.CUSTOM" />
       </activity>
   </application>
</manifest>
answered Jun 21 by nisha
• 2,160 points

Related Questions In Others

0 votes
0 answers

Error - Android resource linking failed (AAPT2 27.0.3 Daemon #0)

 I encountered this error when I tried ...READ MORE

May 7 in Others by narikkadan
• 10,840 points
409 views
0 votes
0 answers

error: package com.android.annotations does not exist

This is my class: import com.android.annotations.NonNullByDefault; @NonNullByDefault public final class ...READ MORE

May 13 in Others by Kichu
• 19,040 points
52 views
+2 votes
2 answers
0 votes
1 answer

Error waiting for a debug connection: The log reader stopped unexpectedly

Hi@akhtar, You need to add textDirection in your ...READ MORE

answered Jul 23, 2020 in Others by MD
• 95,360 points
1,601 views
0 votes
1 answer

Error waiting for a debug connection: The log reader stopped unexpectedly

Hi@akhtar, You need to execute flutter clean command in your project ...READ MORE

answered Jul 24, 2020 in Others by MD
• 95,360 points
2,926 views
0 votes
1 answer

Error: IllegalArgumentException: Unable to locate adb in Android Studio v2.3

when you try to move an Android project ...READ MORE

answered Dec 16, 2020 in Others by Gitika
• 65,850 points
1,664 views
0 votes
1 answer

Android Studio: Where is the Compiler Error Output Window?

While using Android Studio 3.1, please select ...READ MORE

answered Feb 11 in Others by Rahul
• 8,980 points
141 views
0 votes
1 answer

How to prepare an APK for the Amazon Android App Store

you should use zipalign during every build, ...READ MORE

answered Jun 1 in Others by nisha
• 2,160 points
22 views
0 votes
1 answer

How to make Diamond shape xml background for android view

you can do this: <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> ...READ MORE

answered Jun 1 in Others by nisha
• 2,160 points
32 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP