cordova 学习笔记
生活随笔
收集整理的這篇文章主要介紹了
cordova 学习笔记
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
0.sdk安裝
http://spring.io/guides/gs/android/
1.安裝(node.js 需要安裝https://nodejs.org/)
on OS X and Linux:$ sudo npm install -g cordovaon Windows:C:\>npm install -g cordova $ sudo npm install -g cordova@3.1.0-0.2.0 安裝指定版本?2.創(chuàng)建
# hello 項(xiàng)目目錄(不存在會(huì)自動(dòng)創(chuàng)建)# com.cc.hello 反向domain標(biāo)示 (可選)
# HelloWord 應(yīng)用程序的標(biāo)題(可選)
$ cordova create hello com.cc.hello HelloWorld
3.添加platform
#切換到項(xiàng)目目錄 $ cd hello #add platform on mac $ cordova platform add ios $ cordova platform add amazon-fireos $ cordova platform add android $ cordova platform add blackberry10 $ cordova platform add firefoxos#add platform on window $ cordova platform add wp8 $ cordova platform add windows $ cordova platform add amazon-fireos $ cordova platform add android $ cordova platform add blackberry10 $ cordova platform add firefoxos4.檢查platforms
$ cordova platforms ls 本機(jī)輸出效果 Installed platforms: android 4.0.2, firefoxos 3.6.3, ios 3.8.0, windows 4.0.0, wp8 Available platforms: amazon-fireos, blackberry10, browser, windows85.編譯(cordova 5.1.1 的sdk需要android-22)?
$ cordova build android6.起模擬器(avd 配置 no system images installed for this target? haxm error)
$ cordova emulate android #to deploy the app on a connected device $ cordova run android --device? cordova run ios --list?to see all available targets and?cordova run ios --target=target_name?to run application on a specific device or emulator (for example,?cordova run ios --target="iPhone-6")
?
7.運(yùn)行app
$ cordova run android8.android studio 設(shè)置sdk
9.插件管理
#安裝plugman $ npm install -g plugman#安裝plugin $ cordova plugin add cordova-plugin-battery-status#移除plugin $ cordova plugin remove cordova-plugin-battery-status#a platform install plugin $ E:\hello>plugman -d install --platform android --project E:\hello\platforms\android --plugin cordova-plugin-battery-status#remove plugin $ E:\hello>plugman -d uninstall --platform android --project E:\hello\platforms\android --plugin cordova-plugin-battery-status10.app name
ios:xcode中選中項(xiàng)目,修改ProductName?
轉(zhuǎn)載于:https://www.cnblogs.com/zhxhdean/p/4617833.html
總結(jié)
以上是生活随笔為你收集整理的cordova 学习笔记的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【转】Kconfig,Makefile
- 下一篇: MFC属性页对话框