IT Share you

Gradle 오류 : 지원되는 최소 Gradle 버전은 3.3입니다.

shareyou 2020. 12. 13. 11:25
반응형

Gradle 오류 : 지원되는 최소 Gradle 버전은 3.3입니다. 현재 버전은 3.2입니다.


오늘 Android Studio를 업데이트하면 다음과 같이 작성됩니다. 지원되는 최소 Gradle 버전은 3.3입니다. 현재 버전은 3.2입니다.이 문제를 어떻게 해결할 수 있습니까?

여기 내 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
}

두 번째 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

distributionUrl 속성을 3.3-all.zip으로 변경했을 때 새로 고침이 멈췄습니다.이 문제로 무엇을 해야할지 모르겠습니다. 제발 도와주세요 정말 감사합니다


https://gradle.org/releases 에서 최신 버전을 다운로드 한 후 file / project structure / project로 이동하여 새 버전을 gradle 버전에 넣어야합니다.


업데이트 된 답변 : Android Studio 3.1 이상

들어 안드로이드 스튜디오 3.1 및 위의이 distributionUrl업데이트 된 버전 4.6 에서 버전 4.4 . 귀하는 gradle-wrapper.properties다음과 같아야합니다 :

#DATE
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

업데이트 된 답변 :

들어 안드로이드 스튜디오 3.0 및 위의이 distributionUrl업데이트 된 버전 4.1 에서 버전 3.3 . 귀하는 gradle-wrapper.properties다음과 같아야합니다 :

#DATE
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

원래 답변 :

#DATE
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

Open File> Settings> Build, Execution, Deployment> Build Tools> Gradle에서 기본 gradle 래퍼를 사용하고 있는지 확인합니다.


열다 gradle-wrapper.properties

distributionUrl온라인 에서 버전 변경


제 경우에는 setting.gradle파일 이 누락되었습니다 .


이것이 Google이 오류의 첫 번째 결과이므로 하단 창 오류 메시지 파란색 링크 "Gradle 래퍼 수정 및 프로젝트 Gradle 설정 다시 가져 오기"를 클릭 하면 자동으로 수정됩니다.

여기에 이미지 설명 입력


  • distrubutionUrl이 4.1에서 4.4로 변경되었습니다.

  • project / android에서 빌드 gradle 버전을 3.1.1로 변경했습니다.

나를 위해 작동합니다.


gradle-wrapper.properties를 엽니 다.

distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

그것을 변경

distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

Android Studion 버전 3.3.2의 경우

1) gradle 배포 URL을 다음으로 업데이트했습니다. distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip in gradle-wrapper.properties file

2) 최상위 build.gradle 파일 내에서 gradle 플러그인을 버전 3.3.2로 업데이트했습니다.

dependencies {
    classpath 'com.android.tools.build:gradle:3.3.2'
    classpath 'com.google.gms:google-services:4.2.0'
}

낮은 버전이 있고 높은 gradle 버전으로 프로젝트를 가져 오는 데 문제가 있고 gradle을 업데이트하지 않고 프로젝트를 실행하려는 경우

gradle 파일 (Project)을 열고 작은 변경을 수행하십시오.

  dependencies {
           /*Higher Gradle version*/
//        classpath 'com.android.tools.build:gradle:3.0.0-alpha4'

        /*Add this line and remove the Higher one*/
        classpath 'com.android.tools.build:gradle:2.3.3'
    }

[2.3.3은 Gradle 버전을 의미합니다.]

in your case change version to 3.2 or 3.2.0 something like that


Error Message: Gradle sync failed: Minimum supported Gradle version is 4.9. Current version is 4.1-milestone-1. If using the gradle wrapper, try editing the distributionUrl in SampleProj/app/gradle/wrapper/gradle-wrapper.properties to gradle-4.9-all.zip

I am using Android studio IDE version 3.2 beta 2.

Solution: When we open gradle-wrapper.properties file in IDE it shows correct distributionUrl. but originally it has not been updated. So change the distributionUrl property manually.

Example : open a gradle-wrapper.properties file in notepad or any other editor. /Project/app/gradle/wrapper/gradle-wrapper.properties and change distributionUrl property to like this

distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-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:

distributionUrl = https\://services.gradle.org/distributions/gradle-4.6-all.zip

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)

    dependencies {
           classpath 'com.android.toolsg.build:gradle:2.3.2' 
           ..
    }
    
  • gradle.wrapper.properties

    ...
    distributionUrl=https://services.gradle.org/distributions/gradle-3.3-all.zip


Update Android Studio and Gradle. Changing the respective updated gradle version in build.gradle file worked for me.


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


android studio로 gradlew 파일을 열면 모든 것이 다운로드됩니다.

참고 URL : https://stackoverflow.com/questions/43077386/gradle-error-minimum-supported-gradle-version-is-3-3-current-version-is-3-2

반응형