Questions tagged [aapt2]

146 questions
63
votes
32 answers

AAPT error: resource drawable/... not found

After recently upgrading my android studio, I am not able to build my project anymore. Every time I execute a build, I am struck with the following error: error: resource drawable/splash_screen (aka…
Lucas Romier
  • 1,291
  • 1
  • 13
  • 22
31
votes
7 answers

Could not find aapt2-proto.jar

See this link (as I suspected) has the POM file and no jar. Important Notes: I am using latest version of react native ... v0.57.3 and also latest version of react-native-cli ... v2.0.1 at this time. I have Java 11 installed in my computer. I am…
Harry
  • 951
  • 2
  • 12
  • 18
18
votes
3 answers

How to use aapt2, where is the documentation?

I have used aapt p to package resources and generate R.java. But when I upgraded to Android 24, I found aapt2.exe. Should I use aapt2.exe? How do I use it? I could not find any documentation about it.
chenie
  • 195
  • 1
  • 1
  • 5
16
votes
3 answers

Android Gradle build error "AAPT2 aapt2-4.1.0-6503028-windows Daemon #0: Unexpected error during link, attempting to stop daemon."

I got this error while trying to build an Android app: > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > AAPT2 aapt2-4.1.0-6503028-windows Daemon #0: Unexpected error during link, attempting to…
Schnelldev
  • 823
  • 1
  • 6
  • 15
12
votes
1 answer

Where to find aapt2 logs?

When I try to build my project, I get the following error: In the end it is stated: "check logs for details". Where to find those aapt2 logs?
Eugene Chumak
  • 3,272
  • 7
  • 34
  • 52
11
votes
6 answers

Android studio AAPT: error failed writing to R.txt: the data is invalid

I am having an issue with building new projects on android studio. I keep on getting the error: Execution failed for task ':app:processDebugResources'. > A failure occurred while executing…
Alexander Laevens
  • 111
  • 1
  • 1
  • 4
11
votes
5 answers

Error: attribute 'package' in tag is not a valid Android package name

I am trying to write an android app, which used to build once upon a time. Now, everytime I build, I get the following error: Caused by: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking…
jay p
  • 175
  • 1
  • 2
  • 9
11
votes
5 answers

Android - resource linking failed / failed linking references

I checked the Local history of my XML files and double checked my Manifest file and found nothing wrong. Before posting the question I went through a lot of similar posts and suggested answers but found nothing relevant to my issue. Down below you…
Thorvald
  • 3,424
  • 6
  • 40
  • 66
11
votes
5 answers

Android resource linking failed

does anyone know what is this error and how can I fix this? I am trying to open a source code from Mumble and stucked with this error Android resource linking failed Output: …
Shakib Karami
  • 678
  • 1
  • 4
  • 11
10
votes
4 answers

Why is Android Studio failing to build, with an AAPT2 error on images?

After a recent update, Android Studio fails to build an unmodified project with errors along these lines: > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > AAPT2 aapt2-4.1.1-6503028-linux Daemon…
John Perry
  • 2,497
  • 2
  • 19
  • 28
10
votes
3 answers

AAPT: error: unexpected element found in

I am trying to create an android app for watchduino2.. When i follow the provided steps i encounter the error AAPT: error: unexpected element found in Can somebody explain this problem? And also help me to…
Vijay
  • 139
  • 1
  • 1
  • 6
10
votes
6 answers

FAILURE: Build failed with exception

> Executing tasks: [:app:assembleDebug] > > WARNING: The option 'android.enableAapt2' is deprecated and should not > be used anymore. Use 'android.enableAapt2=true' to remove this > warning. It will be removed at the end of 2018. :app:preBuild >…
royalapp
  • 173
  • 1
  • 3
  • 7
7
votes
8 answers

AAPT2 error in Android Studio 3.0.1

I'm trying to get a "hello world" application running using Android Studio 3.0.1 and get the following AAPT2 error output: Error:(16) error: not well-formed (invalid token). Error:(16) not well-formed (invalid…
Akshat Chawla
  • 71
  • 1
  • 1
  • 3
6
votes
2 answers

Android Studio - Rebuild Project - Could not download aapt2-4.1.0-6503028-windows.jar

This is the configuration I have on my project: Android Studio 4.1 (September 23, 2020) Android Gradle Plugin Version 4.1.0 Gradle Version 6.7 Compile SDK 29 (Android 10.0 Q) Build Tools 29.0.2 Min Sdk 17 Target Sdk 26 (Android 8.0 Oreo) In the…
asquo
  • 61
  • 1
  • 3
6
votes
5 answers

AAPT2 working abnormally in android studio 3.1 both for True and False flag

I am usingandroid.enableAapt2 = false in my gradle.properties file. After updating android studio to 3.1 my project showing a warning to update or remove AAPT2 flag like below: The option 'android.enableAapt2' is deprecated and should not be used…
0xAliHn
  • 18,390
  • 23
  • 91
  • 111
1
2 3
9 10