When I today update Android Studio it write: Minimum supported Gradle version is 3.3. Current version is 3.2 how can I solve this problem?
Here is my build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and second build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.tosi.ex"
minSdkVersion 14
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } }
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.2.1'
compile 'com.android.support:design:25.2.1'
compile 'com.github.ksoichiro:android-observablescrollview:1.5.0'
compile 'com.android.support:support-v4:25.2.1'
compile 'com.android.support:mediarouter-v7:25.2.1'
compile 'com.google.android.gms:play-services:10.2.1'
compile 'com.android.support:cardview-v7:25.2.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
testCompile 'junit:junit:4.12'
}
gradle-wrapper.properties:
#Tue Mar 28 17:26:02 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2-all.zip
When I changed properties distributionUrl to 3.3-all.zip it stuck in refreshing I don't know what to do with this problem. Please help me Thank you very much
For Android Studion version 3.3.2
1) I updated the gradle distribution URL to
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip in gradle-wrapper.properties file
2) Within the top-level build.gradle file updated the gradle plugin to version 3.3.2
changed distrubutionUrl from 4.1 to 4.4
changed build gradle version to 3.1.1 under project/android
works for me.
Open gradle-wrapper.properties
change it to
I changes only two points
Obviously they were according to the version of the versions that it has, otherwise they would have to download them
buil.gradle(Project)
gradle.wrapper.properties
...
distributionUrl=https://services.gradle.org/distributions/gradle-3.3-all.zip
About Android Studio Gradle plugin version and Required Gradle version, you can see more detailed answer here: What is real Android Studio Gradle Version?
For each version of this Gradle plugin, it requires a minimum Gradle version as listed on below table
(Reference page:gradle-plugin#updating-gradle).
When you update Android Studio, you may receive a prompt to also update Gradle to the latest available version.
For example, Android Gradle Plugin version 3.1.0+ requires a minimal gradle version 4.4.
You can be configured via Android Studio File -> Project Structure -> Project. See below:
Or you can manually modify the file
gradle/wrapper/gradle-wrapper.properties
. For example:First of all you need to download the file from here https://gradle.org/releases
unzip the file and copy folder something like this gradle-3.3(if version is 3.3) and past it to C:\Android\Android Studio\gradle
Now open the Android Studio and from the left top corner Open File > Settings > Build,Execution,Deployment > Gradle
Now give the the path of folder gradle-3.3 in Gradle Home