常用指令
提前搭建好node 环境
使用node 安装 cordova
npm install -g cordova
创建项目
cordova create HelloCordova io.hellocordova CordovaApp
添加插件 cordova plugin add eg:cordova plugin add cordova-plugin-file 添加平台 cordova platform add 查看平台和插件下的安装信息 Cordova plugin ls cordova platform ls 移出平台 cordova platform rm android
一、
C:\Users>npm -v 6.14.8
C:\Users>npm install -g cordova npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs npm WARN deprecated stringify-package@1.
C:\Users>cordova -v ? May Cordova anonymously report usage statistics to improve the tool over time? Yes Thanks for opting into telemetry to help us improve cordova. 12.0.0 ([email protected])
C:\Users>cordova create HelloCordova io.hellocordova CordovaApp Creating a new cordova project.
C:\Users>cd HelloCordova C:\Users\HelloCordova>cordova platform add browser Using cordova-fetch for cordova-browser fs.rmSync is not a function
C:\Users\HelloCordova>cordova platform add android --save
Using cordova-fetch for cordova-android
fs.rmSync is not a function
添加插件的命
E:\code-demo\web-code\HelloCordova>cordova plugin add cordova-plugin-file
Installing "cordova-plugin-file" for browser
Adding cordova-plugin-file to package.json
C:\Users\HelloCordova>cordova platform ls
Installed platforms:
Available platforms:
android
browser
electron
标签:Users,plugin,HelloCordova,platform,add,使用,cordova From: https://www.cnblogs.com/zhangzaizz/p/17476114.html