Questions tagged [aapt]

Android Asset Packaging Tool is the resource compiler for Android apps.

The Android Asset Packaging Tool (aapt) takes your application resource files, such as the AndroidManifest.xml file and the XML files for your Activities, and compiles them. An R.java is also produced so you can reference your resources from your Java code.

Reference: http://developer.android.com/tools/building/index.html

473 questions
11
votes
2 answers

Changing application package name in custom Ant build step

I'm trying to use a custom build to repackage my Android app. I want to create an internal beta version which I can install side-by-side with my production app. This answer looks like exactly what I need, however it doesn't seem to work. Here's the…
Dan J
  • 25,433
  • 17
  • 100
  • 173
11
votes
1 answer

how to update AndroidManifest.XML in resources.arsc using the aapt tool for Android using terminal

I need to update my package id used in the AndroidManifest.XML that is compiled into a resources.arsc file for my Android application (.apk) without decompiling the resources.arsc. The android aapt tool includes the option to update (-u) as well as…
user1402060
  • 143
  • 1
  • 6
10
votes
1 answer

Building a project with Ant that includes ActionbarSherlock as a library project

I'm having an issue building my project with Apache's Ant which includes ActionbarSherlock as a project library. I have successfully included the library using "android update lib-project --path . --target android-13" in actionbarsherlock library…
user1179330
  • 101
  • 4
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
10
votes
4 answers

Repackage APK file to contain custom assets - what build tool to use?

Update: This is an old post, and references below to broken aapt versions will be out of date. Based on previous feedback, I am storing custom text fields in the assets directory of my app. I will write the app, using default user details in an…
Richard Le Mesurier
  • 29,432
  • 22
  • 140
  • 255
10
votes
4 answers

adb shell command to check the apk is debug or release signed?

How to check if apk is debug or release signed? Is there any direct adb command to verify apk signature? Tried the following dumpsys and aapt commands, but I am not able to find the exact flag adb shell dumpsys package aapt dump…
Lava Sangeetham
  • 2,943
  • 4
  • 38
  • 54
10
votes
9 answers

aapt.exe has stopped working

I recently transferred my workspace to another workstation then the error "aapt.exe has stopped working" showed. I have read some answers to uncheck Build Automatically, update my SDK, or make the Android Build Output to Normal then the crash would…
Compaq LE2202x
  • 2,030
  • 9
  • 45
  • 62
9
votes
3 answers

Documentation for aapt element in Ant script

I'm working on some Ant scripts for an Android build system and have come across an element to call aapt. I have seen lots of examples with exec executable="${aapt}" but the ones that come out of the main_rules.xml file use a different format …
Snowwire
  • 530
  • 1
  • 6
  • 14
9
votes
1 answer

Android resource linking failed - AAPT: error: resource android:attr/dialogCornerRadius not found

I am receiving errors when trying to bundle an android release for a react-native project. This project should be converted to AndroidX as a note. Error Messages When trying to build a release build for Android I receive the following errors: *…
StuartM
  • 6,743
  • 18
  • 84
  • 160
9
votes
2 answers

Configure gradle.properties android.enableAapt=false on travis yml file

In my android's gradle.properties I have the following: android.enableAapt2=false My gradle.properties is located in my ~/.gradle/gradle.properties in my local machine. I am wondering how I can add android.enableAapt=false to my yml file. I tried…
ant2009
  • 27,094
  • 154
  • 411
  • 609
9
votes
2 answers

libpng error: Not a PNG file

I have tried several times to upgrade Android Studio build tools past 1.3.1, but I always end up with this libpng error. I solved one of the errors by completely removing a maven dependency (since the gradle console pointed to exactly where the…
9
votes
8 answers

aapt ERROR getting 'android:name' attribute: attribute is not a string value

As my apk is generated I execute the command aapt dump badging on it. I keep receiving the following error: application: label='Name' icon='res/drawable/icon_128x128.png' application-debuggable launchable-activity: …
KunYu Tsai
  • 632
  • 1
  • 10
  • 15
9
votes
1 answer

How can I use multiple -S values with aapt without using ?

I am trying to build R.java by using aapt from the command line. I am specifying multiple -S directories because I have multiple res directories. I am building by using: aapt package \ -M AndroidManifest.xml \ -m -J gen \ -S…
bolinfest
  • 3,710
  • 2
  • 27
  • 40
9
votes
2 answers

Getting aapt source using git

how can I download Android Asset Packaging Tool (aapt) source using git from this URL https://android.googlesource.com/? Thanks
Kiril
  • 6,009
  • 13
  • 57
  • 77