简体   繁体   English

支持的最低Gradle版本为4.6。 当前版本是4.1

[英]Minimum supported Gradle version is 4.6. Current version is 4.1

by mistake, I deleted the android platform of my ionic project, and when I reinstalled it, it marked me error when running cordova build --release android 错误地,我删除了我的离子项目的android平台,当我重新安装它时,它标记了我运行cordova build --release android时的错误cordova build --release android

this is my ionic info 这是我的离子信息

Ionic: 离子型:

ionic (Ionic CLI)             : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework               : @ionic/angular 4.4.2
@angular-devkit/build-angular : 0.12.4
@angular-devkit/schematics    : 7.2.4
@angular/cli                  : 7.2.4
@ionic/angular-toolkit        : 1.4.1

Cordova: 科尔多瓦:

cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms     : android 6.4.0, browser 6.0.0, ios 5.0.1
Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 7 other plugins)

System: 系统:

Android SDK Tools : 26.1.1 (/Users/usuario/Library/Android/sdk)
NodeJS            : v10.15.3 (/usr/local/bin/node)
npm               : 6.4.1
OS                : macOS Mojave

MacBook-Air-de-Usuario:HogApp_29_mayo_2019 usuario$ cordova build --release android
ANDROID_HOME=/Users/usuario/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home
Subproject Path: CordovaLib

FAILURE: Build failed with an exception. FAILURE:构建因异常而失败。

* Where:
Build file '/Users/usuario/Desktop/HogApp_29_mayo_2019/platforms/android/build.gradle' line: 20

* What went wrong:
A problem occurred evaluating root project 'android'.
> Failed to apply plugin [id 'com.android.application']
   > Minimum supported Gradle version is 5.1.1. Current version is 4.1. If using the gradle wrapper, try editing the distributionUrl in /Users/usuario/Desktop/HogApp_29_mayo_2019/gradle/wrapper/gradle-wrapper.properties to gradle-5.1.1-all.zip

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
/Users/usuario/Desktop/HogApp_29_mayo_2019/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* Where:
Build file '/Users/usuario/Desktop/HogApp_29_mayo_2019/platforms/android/build.gradle' line: 20

* What went wrong:
A problem occurred evaluating root project 'android'.
> Failed to apply plugin [id 'com.android.application']
   > Minimum supported Gradle version is 5.1.1. Current version is 4.1. If using the gradle wrapper, try editing the distributionUrl in /Users/usuario/Desktop/HogApp_29_mayo_2019/gradle/wrapper/gradle-wrapper.properties to gradle-5.1.1-all.zip

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

You should need to remove the android platform again and please install 6.4.0 version. 您应该再次删除Android平台,请安装6.4.0版本。 Its helpful to resolve that problem or you can upgrade gradle version in gradle-wrapper file. 它有助于解决该问题,或者您可以在gradle-wrapper文件中升级gradle版本。

For add Android 6.4.0 version run below command : 对于添加Android 6.4.0版本运行以下命令:

ionic cordova platform add android@6.4.0 离子cordova平台添加android@6.4.0

Adding to the previous answer, here is the documentation for the Cordova Android Platform Guide. 添加到上一个答案, 这里是Cordova Android平台指南的文档。 This will tell you the versions and Supported Versions as well as the Gradle version information. 这将告诉您版本和支持的版本以及Gradle版本信息。 So removing and redownloading the proper Android Platform version with help with this. 因此,在帮助下删除和重新下载正确的Android平台版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Ionic Android最低支持的Gradle版本是4.6。 当前版本是4.1 - Ionic Android Minimum supported Gradle version is 4.6. Current version is 4.1 最低支持的Gradle版本是4.6 - Minimum supported Gradle version is 4.6 支持的最低 Gradle 版本为 4.1。 当前版本是 3.3 - Minimum supported Gradle version is 4.1. Current version is 3.3 支持的最低Gradle版本为4.4。 当前版本是4.1 - Minimum supported gradle version is 4.4. Current version is 4.1 错误:android studio 3.0.1 中支持的最低 gradle 版本为 4.6 - Error : minimum supported gradle version is 4.6 in android studio 3.0.1 支持的最低Gradle版本为2.14.1。 当前版本是2.10 - Minimum supported Gradle version is 2.14.1. Current version is 2.10 管道:支持的最低Gradle版本为4.10.1。当前版本是4.4 - Pipelines: Minimum supported Gradle version is 4.10.1. Current version is 4.4 错误:支持的最低 Gradle 版本为 5.6.4。 当前版本是 5.2.1 - ERROR: Minimum supported Gradle version is 5.6.4. Current version is 5.2.1 Gradle 错误:支持的最低 Gradle 版本是 3.3。 当前版本是 3.2 - Gradle error: Minimum supported Gradle version is 3.3. Current version is 3.2 Cordova / Ionic build android Gradle 错误:支持的最低 Gradle 版本为 2.14.1。 当前版本是 2.13 - Cordova / Ionic build android Gradle error: Minimum supported Gradle version is 2.14.1. Current version is 2.13
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM