当前位置: 首页 > 知识库问答 >
问题:

ionic 2-错误在Android Studio中也找不到Gradle的安装版本

孔飞翔
2023-03-14

我创建Ionic2项目并添加诊断cordova插件,如下所示:

ionic plugin add cordova.plugins.diagnostic

npm install --save @ionic-native/diagnostic

并且像这样添加android平台:

ionic platform add android@latest
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
 var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-3.3-all.zip'
var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'file:///E:/gradles/gradle-3.3-all.zip';

共有1个答案

卫彭亮
2023-03-14

尝试安装gradle并将其包含到您的路径中。单击下面的链接获得手册。https://gradle.org/install

 类似资料: