Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export signed app without "optimizing" png images

Tags:

android

adt

When I export an apk from eclipse, it compresses all of the png images. For example, one 4.6 KB png became 2.15 KB inside the apk. However I prefer to optimize png files using tinypng before the apk is built, which makes much smaller files. The same 4.6 KB png became 746 B using tinypng. When building the apk, compression ran on my 746 B png making it 1.6 KB.

Is there any way to disable this optimization for future builds?

like image 226
Minas Avatar asked Mar 06 '14 08:03

Minas


1 Answers

In your project build.xml ANT file you can override the -crunch task of the SDK, thus avoiding PNG compression, as you previously compressed them:

<target name="-crunch">
    <echo message="Skipping PNG optimization"/>
</target>
like image 63
Juan Sánchez Avatar answered Oct 29 '22 15:10

Juan Sánchez