I want to export signed apk file from my Android Project with a terminal command line in my mac.
first of all i understand i need to make a build.xml file and i do it with :
./android update project -p MY_PROJECT_FOLDER
then the build.xml file was create and i this command:
ant release
then there was 3 apk files in the bin directory, i moved the file : MyProject-release.apk
to my android device, and when i try to run it it give me an error.
some stuff i found :
- if i run the project from eclipse it run on the device with out any problem.
- if i use android tools in eclipse to make signed apk file, it run without problem.
- if i run it from eclipse the apk in the device is bigger than the apk i make from the command line.
I guess the problem is that ant release builds an UNSIGNED apk file. You need to sign it before you can install it on your device. You can find an example here.
If that does not solve the problem. Please provide additional information about the error.