Prerequisites: there are currently four small android projects, and different channel numbers may be released for promotion, therefore, we need to develop a small packaging tool for non-technical personnel to arbitrarily specify parameters for unlimited packaging.
1. Make the packaging interface into a JFrame interface as follows:
The above contains the ant packaging script. For details, refer to the previous ant online packaging.
2. Copy all the required environments, android-sdk and jdk. These two environments are required for packaging and must be available.
3. the problem is that the tool is compiled into a jar file. If jdk or jre is installed on the machine where the tool is located, the tool runs directly. However, the tool cannot be copied to any machine, therefore, jre must be encapsulated. The following is the running script: environment \ jdk \ jre6 \ bin, where the relative path jre is located.
Start environment \ jdk \ jre6 \ bin \ javaw-jar tool. jar
For details about how to package jar files, refer
Http://www.huomo.cn/developer/article-13f0a.html