We often need to complete the APK, tell us to change the version number, or the package name, but each time the packaging is very long. Let's just go out with an Eclipse project and then use ant to automatically package it.
1. Setting Environment variables
2. Generate Build.xml File
Android update project-t android-21-p./
3. Modify the signature file
Create a text file ant.properties
Key.store=user.keystorekey.store.password=123123key.alias=yingyongbaokey.alias.password=123123
Key.store is where you store your signature files.
4. Packing
Ant Release
5. Check the generated file
Bin directory under xxx-release.apk
--------------------------------------------------------------------------------------------------------------Mac version------- ----------------------------------------------------
proj_path=$1echo proj_path=${proj_path}android_home=/users/vmmac/documents/ Androidsdkecho android_home=${android_home}ant_home=/users/vmmac/documents/apache-ant-1.10 . 1 echo ant_home=${ant_home}export PATH= $PATH: ${android_home}/tools:${android_home}/ platform-tools:${ant_home}/-T android--P./ANT Debug
Export Eclipse Engineering Package apk to Unity3d with Ant