3

I'm using Phonegap in Eclipse (with the ADT plugin).

I have a big framework that I use for my normal HTML projects. This framework is full of js, css and graphics files.

For convenience I included the whole framework inside my Phonegap project, since I might need something from the framework later.

But when I build the apk, all files from the framework are included in the apk, which makes it bigger than 10MB. Most of the files are never used in the project, so I need to find a simple way to exclude those files/folders from the build.

Any suggestions?

Dylan
  • 9,129
  • 20
  • 96
  • 153

3 Answers3

3

I've documented how to do this using build.xml on Coderwall:

https://coderwall.com/p/ogxpdg

I hope this helps somebody out!

  • Gav
gavD_UK
  • 395
  • 5
  • 11
0

This excludes the whole ./www/app directory from the .apk build:

<property name="aapt.ignore.assets" value="&lt;dir&gt;app:" />

AmpT
  • 2,146
  • 1
  • 24
  • 25
0

use the ant build process, remove the files before apk is made in the pre-compile method of the ant build process.

ghostCoder
  • 1
  • 9
  • 49
  • 72
  • Thanks, already read about Ant, but I was hoping there was a more easy way, since I have no idea how to setup Ant yet. – Dylan Apr 01 '12 at 10:28
  • search for it. check this out http://stackoverflow.com/questions/4793220/repackage-apk-file-to-contain-custom-assets-what-build-tool-to-use – ghostCoder Apr 01 '12 at 11:24