ionic3打包出错ionic cordova build android(系列一):could not find an installed version of gradle either in a
Posted 程序猿小范
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ionic3打包出错ionic cordova build android(系列一):could not find an installed version of gradle either in a相关的知识,希望对你有一定的参考价值。
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.然后继续遇到这样的问题:
以上是关于ionic3打包出错ionic cordova build android(系列一):could not find an installed version of gradle either in a的主要内容,如果未能解决你的问题,请参考以下文章
ionic - ionic3.x + cordova7.0.1 环境配置
所有原生 cordova 插件都停止在 Ionic3 上工作
使用 nodejs 8、angularjs、ionic3、cordova8 更新 cordova-android 6 到 9、cordova-ios 5 到 6
如何在 Ionic3、Cordova 和 Angular4 应用程序中获取 android 设备的语言?