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

449 questions
328
votes
15 answers

How to view AndroidManifest.xml from APK file?

Is it possible to view Androidmanifest.xml file? I just changed the extension of the apk file to zip. This zip file contains the Androidmanifest.xml file. But I am unable view the contents of Androidmanifest.xml. It is fully encrypted. How can I…
bharath
  • 13,880
  • 16
  • 53
  • 93
307
votes
20 answers

How to install Android SDK Build Tools on the command line?

I want to setup the Android dev environment from command line, and encounter the following issue: wget http://dl.google.com/android/android-sdk_r22.0.5-linux.tgz after extract the file, run tools/android update sdk --no-ui However, it is too slow…
Zhenguo Yang
  • 3,530
  • 5
  • 15
  • 21
126
votes
4 answers

"aapt" IOException error=2, No such file or directory" why can't I build my gradle on jenkins?

I have a little problem. The Problem: I am trying to build a gradle of my Android Project on Jenkins and now I am standing on this problem i can't resolve. During the Building I have this Error…
Neifen
  • 2,463
  • 3
  • 15
  • 29
88
votes
7 answers

AAPT2 compile failed: invalid dimen on Android 3.0 Canary 1

I am playing around with Instant Apps for Android.I installed all the correct packages and tired to create new Application with Instant App support (checked the box for Instant App when crating new application). The problem is that I always run into…
81
votes
5 answers

Programmatically change the value of a color resource obtained from API response

Let's say, on my API call I have a parameter that's called color. Is it possible to edit or modify an existent R.colors.color to assign the color from the API result? As an example: I make a call to my API and it returns green, now I want to load my…
Skizo-ozᴉʞS
  • 16,233
  • 16
  • 66
  • 129
75
votes
13 answers

Gradle finished with non-zero exit value 1 (ic_launcher.png: error: Duplicate file)

I got this strange error with gradle, please help me! /.../app/build/intermediates/res/debug/drawable-xxhdpi-v4/ic_launcher.png: error: Duplicate file /.../app/build/intermediates/res/debug/drawable-xxhdpi/ic_launcher.png: Original is here.…
Fayçal
  • 1,072
  • 1
  • 11
  • 16
67
votes
4 answers

What is AAPT (Android Asset Packaging Tool) and how does it work?

What does AAPT (Android Asset Packaging Tool) mean? How does it work? Can I ship the .so file of one application in the APK file of another application using AAPT?
Ganesh
  • 733
  • 1
  • 5
  • 12
65
votes
3 answers

Listing permissions of Android application via adb

Using adb, how can I find out the which permissions an Android application requires? Because I want to display the permissions of multiple applications on different devices, viewing them in Google Play or Settings > Applications manager requires too…
Juuso Ohtonen
  • 6,643
  • 7
  • 54
  • 89
58
votes
14 answers

9-patch image error in Android

Whenever I try to add a 9-patch image to the \drawable folder in my project, I get the same error: ERROR: 9-patch image C:\...\res\drawable\appwidget.9.png malformed. Frame pixels must be either solid or transparent (not intermediate alphas). Found…
Heber
  • 581
  • 1
  • 4
  • 5
56
votes
5 answers

How to make Android's aapt and adb work on 64-bit Ubuntu without ia32-libs (works for versions 12, 13 and 14)

Since Ubuntu 13.10 no longer has ia32-libs I cannot get my android development environment running on a clean install of 13.10. The error is ~/android-studio/sdk/build-tools/android-4.2.2/aapt": error=2, No such file or directory This file does…
maiatoday
  • 785
  • 2
  • 7
  • 15
50
votes
8 answers

Android - Inner element must either be a resource reference or empty

Error Details AGPBI: {"kind":"error","text":"error: \u003citem\u003e inner element must either be a resource reference or…
Mable John
  • 2,745
  • 2
  • 17
  • 32
44
votes
8 answers

Android Studio 3.0 Manifest Error: unknown element found

NOTICE: Please do not post this "android.enableAapt2=false" as an answer. It is not a solution. It is just ignoring the real error which is not causing any problem on runtime. Solution was simple, just removed mistakenly placed action tag outside…
Oğuzhan Döngül
  • 7,446
  • 4
  • 36
  • 50
40
votes
12 answers

Where is the R.java file in Android Studio?

Where is the R.java file in Android Studio? Can someone please help with this? I already tried google for the answer but can't find any solution.
TheChessDoctor
  • 531
  • 1
  • 4
  • 7
40
votes
9 answers

"aapt.exe" exited with code 1 when building Mono for Android project

I put together a fairly simple Mono for Android application that does nothing more than play an "AndroidResource" MP3 in a background service (copied from Greg Shackles latest Visual Studio Magazine article on Background Services in MfA). I put the…
patridge
  • 25,457
  • 16
  • 86
  • 129
37
votes
5 answers

Android studio cannot find aapt

Hi I am having trouble compiling, I get this error: Gradle: Execution failed for task ':ElectronicComponentInventorySearch:mergeDebugResources'. java.io.IOException: Cannot run program "/opt/android-studio/sdk/build-tools/android- 4.2.2/aapt":…
omegacore
  • 1,702
  • 2
  • 12
  • 14
1
2 3
29 30