-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a build apk button #3
Comments
http://developer.android.com/tools/building/building-cmdline.html Looks like you need to use ant / steal that script. |
We've done it, somehow. Here are the commands for dexing files and also building APKs. It's ridiculous that I had to go digging in the anttasks source to find these. Dex: SDK_DIRECTORY/build-tools/20.0.0/lib/dx.jar NOTE: dx.bat / the dx script is just findjava, and passes any parameters as well as -Xmx1024M for heap size stuffs AAPT: SDK_DIRECTORY/build-tools/20.0.0/aapt P.S. That test apk outputted doesn't run. Check if you need to sign it or include -A or something. |
Update: Dex: aapt: aapt p -v -f -M PROJECT/AndroidManifest.xml -A PROJECT/assets -S PROJECT/res -I SDK_DIRECTORY/platforms/android-7/android.jar -F PROJECT/bin/AndroidTest.unsigned.apk (-S library/res too if first time) Then you must add classes.dex to the apk file. I suggest doing it manually via zipfile stuff. More testing still needs to be done on this before coding can really begin. |
The above works for apks that were already generated by Eclipse. Dex is the same, but avoid adding duplicate libraries. aapt must add all library's res if it was not generated by eclipse, along with --auto-add-overlay. |
For an idea on avoiding adding duplicate libraries: Create a LibraryFile class. This holds a File object + the hash of the file. Make an arraylist of these objects temporarily Override .equals to compare hash only, and transfer to a new arraylist (use contains). for (T element : original) { |
You should probably put a new window for console output though...
The text was updated successfully, but these errors were encountered: