Minimum supported Gradle version is 5.4.1. Current version is 4.10.1. If using the gradle wrapper
問題
在Terminal執行gradle build報錯,很簡單的問題總是忘記怎么解決,這里做個記錄。
Caused by: java.lang.RuntimeException: Minimum supported Gradle version is 5.4.1. Current version is 4.10.1. If using the gradle wrapper, try editing the distributionUrl in D:\WorkSpace\eagle-modules\KeyvoxDeliveryLoc
ker\gradle\wrapper\gradle-wrapper.properties to gradle-5.4.1-all.zip
然后配置是肯定沒問題的:
distributionUrl=https://services.gradle.org/distributions/gradle-5.4.1-all.zip
classpath 'com.android.tools.build:gradle:3.5.1'
解決
檢查一下你的gradle_home環境變量吧,是不是環境變量引用的不是5.4.1版本