一、安装node.js:
node-v7.7.2-x64.msi
npm //测试
二、安装cordova:
npm install -g cordova
npm update -g cordova //更新
npm info cordova version //版本信息
cordova //测试
三、安装java JDK:
配置环境变量:
JAVA_HOME = C:\Java
PATH = C:\Java\bin;
java //测试
javac //测试
四、安装gradle:
gradle-3.4.1-all.zip 解压
修改环境变量:
PATH = C:\gradle\gradle-3.4.1\bin;
gradle //测试
五、安装android sdk:
可以直接安装 android studio
修改环境变量:
ANDROID_HOME = C:\Android\sdk
PATH = C:\Android\sdk\tools;C:\Android\sdk\platform-tools;
adb //测试
六、调试:
adb devices //判断是否有设备
cordova run android //手机调试(如果手机没有连接 会自动打开虚拟机)
cordova emulate android //AVD测试
七、SDK路径错误:
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: not installed
Android SDK not found. Make sure that it is installed. If it is not at the default location,
Gradle: not installed
Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: C:\Users\gu\AppData\Local\Android\sdk\tools\templates\gradle\wrapper
Error: Some of requirements check failed
解决1:检查环境变量配置是否成功
解决2:重新下载sdk(单独的)
tools_r25.2.3-windows.zip
替换掉原android-studio安装的tools
参考链接:http://stackoverflow.com/questions/42613882/error-could-not-find-gradle-wrapper-within-android-sdk-might-need-to-update-yo
网友评论