I want to deploy PhoneGap app on the Android simulator provided with eclipse. I decided to use Dojo Toolkit which heavily relies on the " _ " convention (starting a file/folder with " _ " means this is a private/internal module).
Basically the problem is that while deploying the app, every file/folder starting with "_" is omitted. This completely messes things up, Dojo toolkit as exptected fails to work.
Is there a way to fix this?
First go star this issue so Google will fix the bug eventually. If you are running on Mac or Linux there is a patched aapt that fixes the bug here. Other than that your only choice is to do a build of Dojo so that it is only in one file.
From the previous answer I ended making changes on ant.properties
which is located at root of project with this:
aapt.ignore.assets=!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~
Here, I overwrote aapt.ignore.assets
property defined on sdk-android directory. It works
aaptOptions{
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
}
add the above lines in the application build.gradle file inside android block for android app
A work around is to use dojo.js from the CDN
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.9.0/dojo/dojo.js"></script>
Also, I started looking for a minify app or service, which could create a single file from all the required dojo files, but did not find one easily.