The following builders are active with the ADT plug-in installed for the Android project:
- Android Resource Manager
- Android compiler
- Java builder
- Android Package Designer
Looking at the output directory, the following artifacts are created:
- resources.ap_ (just APK / ZIP with resources and without code)
- gen / R.java (auto-generated resource list)
- .class Java bytecode files
- classes.dex $ {ProjectName}
- .apk
For my project, I automatically generate several code artifacts and generally need more tight control over the build process. At first I realized that the resource manager is responsible for creating resources.ap_, the precompiler created by R.java, java builder did the obvious, and then Android Package Builder created classes.dex, and then combined classes.dex and resources.ap_ to create an APK file .
I disabled the first two steps and created a custom pre-assembler in which a copy of resources.ap_ was installed, believing that this would be equivalent. There is no such luck.
Unfortunately, the final Android Package Builder seems to overlap resources directly from res / and ignore my .ap_ resources. In fact, the first two stages of the build seem to do nothing but generate R.java.
Here it becomes very problematic. If I disable the final build step and post my own APK file (with the same name), I get the following error:
[2011-02-27 20:25:28 - android-premium] ------------------------------ [2011-02-27 20:25:28 - android-premium] Android Launch! [2011-02-27 20:25:28 - android-premium] adb is running normally. [2011-02-27 20:25:28 - android-premium] Could not find android-premium.apk!
So, I'm stuck: with Android Package Builder (which does not have a noticeable configuration) I have to provide separate files. / res /. Without this, I cannot run the project on the device (not from Eclipse).
Does anyone have any better ideas / experience in this space?
Dave dopson
source share