Questions tagged [aapt2]
146 questions
3
votes
1 answer
java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
I've made a demo app and added some animation using Lottie, it works fine in debug but fails in release mode.
This is the error I get
Execution failed for task ':lottie-react-
native:verifyReleaseResources'.
>…

Divye Shah
- 747
- 1
- 11
- 24
3
votes
3 answers
error: failed parsing overlays when build AOSP source
Today I has downloaded AOSP and I am trying build newest android version with lunch option is aosp_car_x86-userdebug
But after about 50 minutes, I got the message log as below...
warn: removing resource…

Dong Thang
- 410
- 6
- 6
3
votes
0 answers
Jenkins Android build always fails with AAPT2 errors
I recently set up a Jenkins build server for my Android projects running on Ubuntu 16.04. I've got it mostly working to where it will pull from GitHub and attempt to build a project. For some reason whenever I set up a task to run gradlew build or…

Programmer001
- 2,240
- 2
- 19
- 35
3
votes
3 answers
error: unknown element found after upgrading to android 3.1
Today I upgraded to Android Studio 3.1.4 and I have the first error
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..
Then…

ultra greek
- 31
- 1
- 1
- 2
3
votes
1 answer
Getting the aapt2 parameters of a gradle build?
I am interested in trying to compile an android application from the command line using aapt2. I am having a problem linking the constraint-layout library when I try to perform the aapt2 link command. This program builds successfully from Android…

Derek
- 11,715
- 32
- 127
- 228
2
votes
1 answer
Visual Studio fails to compile .NET MAUI project on Android
When I want to build my .NET MAUI Application on Android, I get this error:
1> C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\33.0.4\tools\Xamarin.Android.Aapt2.targets(212,3): error APT2000: The specified file cannot be found.…

Abristonks
- 83
- 6
2
votes
1 answer
How from aapt2 generate the same ID that was generated by aapt?
For some raison I do not yet understand, aapt and aapt2 do not output the same ID. is their any way to force aapt2 to output the same ID generated by aapt ?

zeus
- 12,173
- 9
- 63
- 184
2
votes
0 answers
How to prevent Android resource file from been renamed
When packaging android release apk, resource files are renamed to short name like "zq.webp" etc:
How to prevent this renaming and remain old style like "res/drawable/ic_launcher.webp"

daemon.yang
- 311
- 3
- 6
2
votes
0 answers
Error using aapt2 link command with androidx appcompat library
I'm attempting to create Java sources for the R class using aapt2, however it results in errors that I'm having trouble working out how to resolve. The library in question is the androidx appcompat library, specifically version 1.0.2.
My steps…

Dave Nottage
- 3,411
- 1
- 20
- 57
2
votes
1 answer
Switch from aapt to aapt2 for native app packaging
We have a great build system, so we're not looking to use gradle. Right now, we use appt to build an APK and it works great and the APK runs well. I see that aapt2 is the future, though, and so we'd like to move to it before we're forced to.
What…

saxzez
- 102
- 9
2
votes
1 answer
invalid file path while trying to rebuild with apktool and aapt2
I am facing an error while try to repack an apk with apkool. below is the error trace.
W: error: invalid file path 'C:\Users\ccre\res\drawable2\abc_ic_search_api_material.xml'.
W: error: invalid file path…

hanan
- 532
- 2
- 7
- 23
2
votes
2 answers
AAPT2 Gradle build error after updating to Android Studio 3.5 (and Gradle 3.5.0)
Have updated Studio to 3.5 (from 3.1).
Gradle upgraded to 3.5.0 (before was 3.1.2 in project).
On building got error: "Unsupported operating system." (before updating project building was without errors)
System is "Linux Mint 4.4.0-112-generic…

Yoko999
- 21
- 1
- 6
2
votes
1 answer
AAPT Build Error Android Resource Fail :Style
Im trying to build my Android Studio project with Gradle. However I keep receiving the following error.
Execution failed for task ':app:mergeDebugResources'.
java.util.concurrent.ExecutionException:…

Ryan Henderson
- 21
- 1
- 2
2
votes
2 answers
How to compile an Android app with aapt2 without using any build tools?
I'm trying to compile an Android application I just created in Kotlin on Android Studio, without using Gradle or any other build tools. My intention is to speed up compiling applications without having to use Android Studio or install build tools…

Ruchira Bandara
- 21
- 1
- 3
2
votes
0 answers
AAPT2 Unexpected error while building signed for release (works for debug)
I have been looking for any solution since last few days. I havn't been releasing new version for some time, so hard to say when it started. I have try t reverso code, tried different versions of AS and Graddle and still nothing.
During building…

Arek
- 51
- 4