Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compile android project to apk without eclipse

What I have done is I have taken the class-files from my eclipse project and run them trough an optimizer/obfuscator. So I now have optimized class-files that I want to get in the form of an apk so I can sign and publish it. However, I am lost on how to do this. I guess I cant just copy them into the bin-folder of my eclipse-project, because eclipse would just overwrite them with a new compilation when I try to export a signed apk. So how do I create an apk from these class-files?

like image 396
pgsandstrom Avatar asked Dec 28 '22 14:12

pgsandstrom


1 Answers

you can try to put them in bin/classes and then use "ant" command to build your application

cd /path/to/my/app
ant release

it will ask you every time for your private key to sign the app, it can be configured to auto-sign by editing "build.properties" file:

key.store=release.keystore
key.alias=release
key.store.password=my_key_password
key.alias.password=my_key_password

you can also investigate Android SDK, find the ANT build scripts it actually uses, and insert your custom obfuscator/optimizer call in middle of build process.

like image 103
zed_0xff Avatar answered Jan 06 '23 15:01

zed_0xff