aapt

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

自作多情 提交于 2019-12-22 05:57:09
问题 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 without using draw9 info. In Android's build.xml <target name="-package-resources" depends="-crunch"> this is calling crunch, which updates the pre-processed PNG cache (anyone know where this cache is held?). -crunch runs a task in aapt called crunch.

Programs running aapt in android sdk from shell and from sbt

蓝咒 提交于 2019-12-21 17:05:20
问题 I have a weird problem where I cannot run aapt from an sbt command as well as from the shell. I run this command: sbt update package-debug And everything hums along until I get this error: java.io.IOException: Cannot run program "/home/egervari/Programs/android-sdk-linux_x86/platforms/android-7/tools/aapt": java.io.IOException: error=2, No such file or directory So I try running it manually, just for the heck of it: egervari@ken:~/Programs/android-sdk-linux_x86/platforms/android-7/tools$ .

ERROR: Unknown option '--no-crunch' - AAPT error

半腔热情 提交于 2019-12-19 21:39:28
问题 I have downloaded latest revision (r14) yesterday. but getting this error while running any application ERROR: Unknown option '--no-crunch' Please help... 回答1: I have recently faced this issue. But it is now solved . After updating to ADT r14, go to Window -> SDK Manager (in Eclipse) Check on 'repository', uncheck "installed" Wait for packages to load, then select all support packages, accept all and install them Restart Eclipse Now you can run your apps on new ADT r14, without 'crunch'

How can I use Android aaptOptions?

十年热恋 提交于 2019-12-19 05:19:14
问题 What are the meaning of the aaptOptions.noCompress , etc.; can anybody explain them to me? android { aaptOptions { noCompress 'foo', 'bar' ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~' } } This affects all tasks using aapt. 回答1: Yes, docs give no clue. Well aapt tool is inside specific build-tools folder and it has options as listed below. For example ignoreAssetsPattern in build.gradle is related to --ignore-assets option The next step would

How to solve Android Libraries custom attributes and package name remapping during build?

柔情痞子 提交于 2019-12-18 12:38:51
问题 Over time our Android project has expanded a great deal, and these days we are creating multiple branded APKs from the same source tree. This has become challenging due to the package naming requirements of Android. We have all of our shared code in an Android Library project, which is included in the main application project. Plus we have Android library 'overlays' for branded resources that get applied for each brand. When we want to build a brand, we include a few extra properties for that

How to pass arguments to aapt when building android apk?

这一生的挚爱 提交于 2019-12-18 05:08:26
问题 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 article: http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/ I see that it's possible to do this by specifying something like aapt -0 db , but I can't find information on how to edit the way ant interacts with aapt. Or do I have to run aapt by itself?

Changing application package name in custom Ant build step

左心房为你撑大大i 提交于 2019-12-17 09:32:15
问题 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 update to my build.xml: <target name="-package-resources" depends="-crunch" > <echo>Repackaging AndroidManifest.xml to ${package.manifest.name} ${out.absolute.dir}/${resource.package.file.name}</echo> <exec executable="${aapt}" failonerror="true">

Changing application package name in custom Ant build step

≯℡__Kan透↙ 提交于 2019-12-17 09:32:10
问题 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 update to my build.xml: <target name="-package-resources" depends="-crunch" > <echo>Repackaging AndroidManifest.xml to ${package.manifest.name} ${out.absolute.dir}/${resource.package.file.name}</echo> <exec executable="${aapt}" failonerror="true">

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

a 夏天 提交于 2019-12-17 04:27:48
问题 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 app with i.e (green Toolbar , green TextView color, etc.), is that possible? My first thought was: Create a item on colors.xml called demo then assign it a default color, then use this demo color wherever I want ( Button , TextView , etc.) Then

How to view AndroidManifest.xml from APK file?

廉价感情. 提交于 2019-12-17 02:25:12
问题 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 view the Androidmanifest.xml file? 回答1: Yes you can view XML files of an Android APK file. There is a tool for this: android-apktool It is a tool for reverse engineering 3rd party, closed, binary Android apps How to do this on your Windows System: