Search Unity

Minimum supported Gradle version is 5.1.1. Current version is 4.6

Discussion in 'Android' started by BrokenAngel, Jun 15, 2019.

  1. BrokenAngel

    BrokenAngel

    Joined:
    Mar 24, 2013
    Posts:
    92
    When I try to build with Gradle I got this

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

    Is there a way to fix this ?
     
    adiomigames likes this.
  2. MoctezumaDev

    MoctezumaDev

    Joined:
    Aug 14, 2013
    Posts:
    53
    I'm having the same issue, were you able to resolve it?
     
  3. AKComp

    AKComp

    Joined:
    Aug 22, 2014
    Posts:
    26
    what is the solution?
     
  4. MechEthan

    MechEthan

    Joined:
    Mar 23, 2016
    Posts:
    166
    You're either specifying the wrong (too new) Android Gradle plugin version in a build.gradle file in your project somewhere, or you're trying to build it in the wrong version (too new) of Android Studio.

    In this particular case, the newest Android Gradle plugin version you can use is 3.2.1.

    For any given Unity install, refer to the versions specified in the Gradle templates found here:
    <your unity install path>/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates


    (Edit: but in your particular case, I would stick with 3.2.0 just out of sheer caution, since that's what is specified in Unity 2017.4's gradle templates, as noted above.)

    Here's the official Gradle version required by Android Gradle plugin documentation: https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
     
    Last edited: Sep 12, 2019
    JuliusM likes this.
  5. AlexHell

    AlexHell

    Joined:
    Oct 2, 2014
    Posts:
    167
    this is NOT a solution.
    settingsTemplate.gradle contains
    dependencies {
    classpath 'com.android.tools.build:gradle:3.2.0'
    and what is the next step?
    need to change? need to update?

    unity produces the error on build
    http://prntscr.com/ts7atr

    note: the file "Temp\gradleOut\gradle\wrapper\gradle-wrapper.properties" not exists
     
    dergopinath777 likes this.
  6. dergopinath777

    dergopinath777

    Joined:
    Sep 16, 2020
    Posts:
    3
    can you find any solution
     
  7. dergopinath777

    dergopinath777

    Joined:
    Sep 16, 2020
    Posts:
    3
    CAN YOU FIND ITs