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
5
votes
1 answer

Android gradle build failed : aapt error 137

Randomly, while trying to build my android applications, I have this message during the mergeResources : Execution failed for task ':ImmoStruct:mergeReleaseResources'. Failed to run command: …
Vincent
  • 51
  • 1
5
votes
1 answer

Andriod:How to set lib path for aapt command?

I was trying to compile Android project using command line in Windows. When I use aapt to generate R file, it comes out an error as below: D:\SampleProject\MyApplication>aapt package -f -m -J ./gen -S ./app/src/main/res -I…
Yunchou Li
  • 301
  • 1
  • 3
  • 4
5
votes
0 answers

Generate R.java Using AAPT

I am trying to generate apk file using command prompt by following below blog. Generate APK using command prompt I successfully generated key, but when i am trying to generate R.java it is giving following error Command i used to generate…
Santhi Bharath
  • 2,818
  • 3
  • 28
  • 42
5
votes
1 answer

Different IDs are generated for the same resource in R classes

When a project with one of more apk libs is compiled, then more then one R.java is generated by the aapt tool. One for each library and one for the application itself. Each of those R files would define the same IDs. This worked without problems for…
Martin
  • 11,577
  • 16
  • 80
  • 110
5
votes
2 answers

Ant Build AAPT Crunch is stripping draw9 information from Library resource images

I have a project that is using a library project. The Library Project has draw9 (9.png) files and when building the apk via Ant it is stripping the draw9 info on scaleable and fillable areas. The result is that the app just stretches the images…
pt123
  • 2,146
  • 1
  • 32
  • 57
5
votes
2 answers

'aapt' error. Pre Compiler Build aborted

I'm using Eclipse 4.2.2 with Android SDK 22.0.1 to construct an Android application which uses the Facebook and Google Play Services lib. However I'm stuck with a problem: every time I include one or both of the library the aapt verbose mode crash…
nigonzalezm
  • 190
  • 2
  • 10
5
votes
2 answers

Android - How to use Android Asset Packaging Tool?

I want to use aapt.exe to stop compress my database.db file when compile my android app. I run terminal (Mac OS) and type: aapt -0 db It throws the error: ERROR: Unknown command '-0' Android Asset Packaging Tool I am using android sdk v20.0.1.…
Nguyen Minh Binh
  • 23,891
  • 30
  • 115
  • 165
5
votes
1 answer

How can I launch and execute Vending.apk on the Android Emulator from adb

I've been trying to install Vending.apk into my emulator w/o success. It says it already exists and fails to replace it when I use adb install -r. The icon does not show up on the screen so I can't tap it to launch the Google Play…
John Klein
  • 130
  • 2
  • 6
4
votes
1 answer

How to pass arguments to aapt when building android apk?

I'm building an apk using ant on Linux (not using Eclipse), and I'm trying to find an easy way to switch between compressing assets and not, in order to keep my huge database uncompressed for < 2.3. As per this…
yuttadhammo
  • 5,069
  • 6
  • 34
  • 45
4
votes
2 answers

Google APIs throw no-crunch error for android

I just installed android 2.1 SDK in eclipse and created a project targeted for Google API:7. Eclipse shows an error on the project icon, and the debug window shows this error ERROR: Unknown command 'crunch' Android Asset Packaging Tool After quite a…
Amit
  • 3,952
  • 7
  • 46
  • 80
4
votes
1 answer

What the purpose of the R.txt file inside aar?

Sometime I can see a R.txt file in some .aar (and in such case there is also a non-empty ./res directory in the aar). What the exact purpose of this R.txt file? Also sometime I can see some AAR with a non-empty ./res directory but without any R.txt,…
zeus
  • 12,173
  • 9
  • 63
  • 184
4
votes
1 answer

How to append aapt flags to Android.bp dynamically

I need to dynamically append new flags to aaptflags property from android_app from Android.bp, based in some conditions. I am trying something similar to this answer, the Go script is executed (I can see it when I add some prints), but the flags are…
Heitor Paceli
  • 493
  • 6
  • 16
4
votes
1 answer

Cannot run Flutter plugin: AAPT: error: unexpected element

I actually create my first android native plugin for flutter. This plugin will be use to implement a hardware android dependency (camera kit who use arcore and camera stream for virtual reallity). This dependency seems to be in beta, but I…
jeremie dupas
  • 83
  • 1
  • 6
4
votes
1 answer

AAPT: error: attribute android:clipToOutline not found

Executing tasks: [:app:assembleDebug] Task :app:preBuild UP-TO-DATE Task :app:preDebugBuild UP-TO-DATE Task :app:compileDebugAidl NO-SOURCE Task :app:checkDebugManifest UP-TO-DATE Task :app:compileDebugRenderscript NO-SOURCE Task…
Akshay Raut
  • 181
  • 2
  • 11
4
votes
1 answer

Android published library xml attributes not found (AAPT)

** See edit below ** I built a multi-library project and published it to a private repository on jitpack.io successfully. Some of the libraries contain resources in the form of layout files, etc. I have another project that implements these…
James B
  • 447
  • 3
  • 15