ionic3打包出错ionic cordova build android(系列一):could not find an installed version of gradle either in android studio

1.运行ionic cordova build android 时报错:could not find an installed version of gradle either in android studio。 

2.问题原因:cordova在6.4.0(cordova-android在6.1.2)之后,会要求安装Gradle,基于Gradle来编译、打包android。

3.解决办法:

  1)去Gradle官网:https://gradle.org/install

  2)下载Gradle:https://gradle.org/releases,我这里下载的是最新的4.0.2版本(gradle-4.0.2-bin.zip);

  3)解压,放置的位置自己定;

  4)配置环境变量:系统变量--Path--编辑:

    

  5)检查是否安装成功:gradle -v (需要重新打开命令行工具)

  6)继续ionic cordova build android

 

4.然后继续遇到这样的问题:

  1)ionic3打包出错ionic cordova build android(系列二):Your project path contains non-ASCII characters:Failed to apply plugin [id 'com.android.application']

 

参考原文:http://www.cnblogs.com/crazyprogrammer/p/6958462.html

posted @ 2017-08-23 18:34  程序猿小范  阅读(826)  评论(0编辑  收藏  举报