cordova创建项目seedApp
cordova create seedApp
Cordova创建应用出错
Cordova安装时不能使用cnpm 应该使用npm,cnpm虽然快但是后期出的错绝对比这省下来的时间多得多。
正确安装方法
npm install -g cordova
将镜像修改为淘宝镜像
二、vue项目导入:将Vue项目除了:node_modules及.git文件全部考到seedApp目录下
执行npm install
2、修改Vue项目config/index.js文件
'use strict' module.exports = { build: { index: path.resolve(__dirname, '../../www/index.html'), assetsRoot: path.resolve(__dirname, '../../www'), assetsPublicPath: '', } }
在index.html中加入:
<script type="text/javascript" src="cordova.js"></script>
cordova platform add android
npm build android
cordova build android