我已将环境变量路径设置为Android sdk目标。 该设备与USB连接,并安装了最新的USB驱动程序。
C:\Users\Lenovo\walkin1>adb devices
List of devices attached
ZY2225FT8N device
> ionic-hello-world@ ionic:build C:\Users\Lenovo\walkin1
> ionic-app-scripts build
[08:55:43] ionic-app-scripts 1.1.4
[08:55:43] build dev started ...
[08:55:43] clean started ...
[08:55:43] clean finished in 33 ms
[08:55:43] copy started ...
[08:55:43] transpile started ...
[08:56:06] transpile finished in 22.58 s
[08:56:06] preprocess started ...
[08:56:06] preprocess finished in 2 ms
[08:56:06] webpack started ...
[08:56:07] copy finished in 23.29 s
[08:56:55] webpack finished in 49.31 s
[08:56:55] sass started ...
[08:57:00] sass finished in 4.50 s
[08:57:00] postprocess started ...
[08:57:00] postprocess finished in 1 ms
[08:57:00] lint started ...
[08:57:00] build dev finished in 76.53 s
[08:57:31] lint finished in 31.48 s
ANDROID_HOME=C:\Users\Lenovo\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk
Subproject Path: CordovaLib
Error: cmd: Command failed with exit code ENOENT
这是我的离子信息输出:
C:\Users\Lenovo\walkin1>ionic info
Your system information:
ordova CLI: 6.5.0
Ionic Framework Version: 2.2.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.5
Xcode version: Not installed
执行以下任务:
1。)npm uninstall cordova -g or npm uninstall -g
2.)cordovaDelete文件夹.cordova
3.)右键单击PC图标>>属性
控制面板>高级系统属性>>环境变量...
将C:\ Windows \ System32定义为系统变量(底部窗口),即SYSTEM_HOME
然后在服务器变量(顶层窗口)中定义%SYSTEM_HOME%
然后运行npm install -g cordova or npm install cordova -g
然后运行ionic add platform android
O / P:platform android already added