Android tool aapt cant find 9patch pictures

  • Antworten:5
  • Bentwortet
tomi87
  • Forum-Beiträge: 4

27.01.2014, 15:40:35 via Website

I get an error when I start running the following command:

1aapt package -v -f -A \assets -M \AndroidManifest -S \res -I \android.jar -F \Projectname.unsigned.apk \bin

1activity_settings.xml:2: error: Error: No resource found that matches the given name (at 'sound' with value '@drawable/btn_sound_active_pressed')

I figured out that if I rename my 9patch files and delet the .9 at the end , the command runs perfektly and It build the .apk file.

My question is How can I change my command that it can also read the 9patch files ?

Antworten
tomi87
  • Forum-Beiträge: 4

27.01.2014, 17:11:00 via Website

impjor
Why do you run aapt yourself? Just let eclipse or AS do this!

I want to certificate an android project just with command line. Cause I wanna create an automated certification program for webpage

What do you mean with "AS" ?
So Im stocked now at the create .apk part.

Antworten
Sven R.
  • Forum-Beiträge: 1.904

28.01.2014, 07:06:37 via App

AS=Android Studio
An IDE for Android Apps development, like Eclipse.

Wenn dir mein Beitrag gefällt, kannst dich einfach mit dem 👍 "Danke"-Button auf der Website dieses Forums bedanken. 😀

Why Java? - Because I can't C#

Antworten
tomi87
  • Forum-Beiträge: 4

28.01.2014, 09:36:17 via Website

The point is I want to let it do by the command promt directly with aapt.
An solution to figure out how this works would be to get the commands of eclipse for generating the .apk file.

But for this I have no idea how to get to this informations of commands.

Can you help me please to find a solution or to fix my aapt command ?

Antworten
tomi87
  • Forum-Beiträge: 4

28.01.2014, 12:13:10 via Website

So i figured it out: I have to "crunch" all picture in the res folder first:

aapt crunch -v -S \res -C \bin\res

And then I pointed as a source folder to the res dir and to the bin\res dir. Also added --no-chrunch --generate-dependencies

aapt package --no-crunch --generate-dependencies -v -f
-M \AndroidManifest.xml"
-S \bin\res
-S \res
-A \assets
-I \android.jar
-F \bin\APPNAME.unsigned.apk \bin

Now Its working perfectly. Also with the .9.png 9patch pictures.

Antworten