1. preparatory work
(1) First install the ant tool .
(2) Generate KeyStore
In the bin directory of the JDK
Input
Enter by action and remember the password.
(3) configuration keystore, this is for signature.
Copy the resulting Andorid.keystore into the project's directory and build the ant.properties file
Key.alias name is consistent with keystore file name, password is the password you set before, two I made the same.
2. Start
(1) Generate compiled files build.xml and local.properties
First view the list of available target
And then enter
Android Update Project--name scaleimage--target android-15--path.
Yes (note: the specificTargetshould be based on the project'sTargetdecision, or there will be an error)
When there is an externally imported Jar Library, it will be automatically written, but when there is a dependent library , it is necessary to first set up the above two files in a dependent library , I encountered a similar problem , prompting you to use --subprojects
To the library directory, mine is
Input
Android update lib-project-p./
Then update to the original directory
Android Update Project--name scaleimage--target 12-p./--subprojects
Here target is optional, I have updated target at the same time
At this point, all work is done and you can view the root directory
(2) Packaging
Go back to Eclipse, update the project, add buildfiles in Ant
Debug is a default only one-year period of the signature,release is the previous set of the signing deadline, click release to complete the package, If you're having trouble , clean it up and try again .
Generated an apk package with a signature
Android app Ant pack