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, 2022 in Others by polo
• 1,480 points
951 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, 2022 by nisha
• 2,210 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, 2022 in Others by narikkadan
• 63,420 points
2,039 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, 2022 in Others by Kichu
• 19,050 points
2,757 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,440 points
2,169 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,440 points
6,178 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,910 points
2,300 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, 2022 in Others by Rahul
• 9,670 points
3,179 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, 2022 in Others by nisha
• 2,210 points
327 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, 2022 in Others by nisha
• 2,210 points
1,738 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP