一、安装Cordova
>npm install -g cordova
需要安装node.js和express
二、创建应用
>cordova create hello com.example.hello HelloWorld
三、添加支持平台
>cd hello
>cordova platform add android --save //添加Android平台
四、查看平台支持环境
>cordova requirements
Requirements check results for android:
Java JDK: installed .
Android SDK: installed
Android target: installed android-19,android-21,android-22,android-23,Google Inc.:Google APIs:19,Google Inc.:Google APIs (x86 System Image):19,Google Inc.:Google APIs:23
Gradle: installed
五、构建应用
>cordova build
六、测试应用
>cordova emulate android