Search code examples
androidandroid-studio-3.1.4

Android studio incorrect gradle


I'm following this tutorial, and when I go to build APK I get the following:

Unsupported version of gradle
Update gradle and re-import project
Gradle settings

But when I go and Update gradle and re-import project, I get

Unsupported version of gradle:
Supported version is 2.2
Update gradle and re-import project
Gradle settings

And I get an infinite loop in this, rendering the development useless (since I can`t even devploy my application as an APK)

My Android Studio Version: 3.1.4


Solution

  • Open gradle/wrapper/gradle-wrapper.properties and try to replace existing ditributionUrl with a newer version, say 4.5:

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

    Then re-import the project.