cordova升级7.0后,运行

>

ionic build android  或者

cordova build android     报出错误

Error: Could not find an installed version of Gradle either in Android Studio,
       or on your system to install the gradle wrapper. Please include gradle
       in your path, or install Android Studio

需要下载并安装gradle:gradle-x.x-bin.zip

gradle地址:(https://services.gradle.org/distributions)

安装后添加环境变量路径:

1 Gradle_path = D:\soft\gradle-4.12 PATH=%GRADLE_HOME%\bin\;

注意: gradle-4.1要求jdk在7.0以上

测试: gradle -v

重新cmd打开命令窗口。

执行:ionic build android 

 

 

 

posted on 2017-07-25 15:20  zhaoqiang1980  阅读(3062)  评论(0编辑  收藏  举报