Dylan
Dylan

Reputation: 9373

Phonegap: possible to exclude certain files/folders from the apk?

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?

Upvotes: 3

Views: 3494

Answers (3)

AmpT
AmpT

Reputation: 2584

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

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

Upvotes: 0

gavD_UK
gavD_UK

Reputation: 395

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

https://coderwall.com/p/ogxpdg

I hope this helps somebody out!

  • Gav

Upvotes: 3

ghostCoder
ghostCoder

Reputation: 7655

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

Upvotes: 0

Related Questions