Prerequisites, the computer installed Nodejs and Cordova, do not elaborate, the back of a related blog to record a bit.
This article mainly from the pure Operation angle Introduction uses Cordova the HTML5 project package Cheer Zhuo installs the package the process, had seen many predecessors to write the experience to the specific operation part to introduce insufficiently meticulous, in order to facilitate the later person better reference, therefore this record.
First step: Create a new folder on disk to hold the items created by Cordova
For example, create a new folder under D-Drive download Ruyi
From the cmd command line into the Ruyi directory,
Run the Cordova command to create the project
Ruyi: Project folder name
Com.hero.ruyi: Project Internal Package name
Ruyiyule: Project name, the name of the package that is displayed after the installation program is installed
Go to the newly created project folder Ruyi, the file structure is no longer described
Copy all of your project code into the WWW folder, including all HTML, CSS, JS files and pictures, etc.
Run the Cordova command to specify the project platform
Compiling the project
Wait a while, the build successful to show that the compilation was successful
Import the compiled project into eclipse
Then export the project
The first export requires creating a file with the suffix named KeyStore and setting the password
Fill in the relevant information and click Finish to export an APK installation package.
If you want to modify the icon for the installation package, you can modify the config file
Image storage location, for different resolutions of the device, the corresponding folder in the picture one by one to replace the picture you want
After you have modified the CONFIG. ide file, recompile the Android project and refresh the Eclipse project and re-export it to the new apk.
Cordova+eclipse Packaging APK installation package