Android Error: (1, 0) Gradle version 2.2 is required. Current version is 3.4.1.

Source: Internet
Author: User

We didn't have a problem with creating a new project when we were using Android studio, but we couldn't use it when we downloaded a project on GitHub, mainly because of the gradle configuration problem. And because gradle this gadget version is updated too fast, Android studio each version is also different. For example, the version 2.3 uses Gradle is 3.3, and the 2.4 version uses 3.4.1. So what's the problem at this time? When you import a 2.3 version of a project using the Android Studio 2.4 version, you will be prompted to modify the version of Gradle. Sometimes Android Studio Smarter will modify itself, but it is not so fortunate at times, such as the following diagram:

 Error: (1 , 0 ) Gradle version 2.2  is  1  .  Please fix the project   " s Gradle settings.  <a href= fixgradleversioninwrapper   >fix Gradle wrapper and Re-import Project</a><br><a Href=  " >gradle settings</a> 

What should be the solution to this problem? This time you need to modify the Distributionurl value in the Gradle-wrapper.properties file under the wrapper folder under the Gradle folder, which is based on your current version of Android Studio. You also need to modify the value of Classpath in the Build.gradle file under the project root, which is also available with the Android studio version, for example, 2.4 Preview 3 uses ' Com.android.tools.build: Gradle:2.4.0-alpha3 '. Put down the detailed inside such as:

Gradle-wrapper.properties

 on : £distributionbase=Gradle_user_homedistributionpath =wrapper/distszipstorebase=gradle_user_homezipstorepath=wrapper/  Distsdistributionurl=https\://Services.gradle.org/distributions/gradle-3.4.1-all.zip 

Build.gradle

Buildscript {    repositories {        jcenter ()        mavencentral ()    }    dependencies {        '  com.android.tools.build:gradle:2.4.0-alpha3'        //  Note:do not place your application dependencies here; They belong        // in the individual module build.gradle files    }}

OK, after the revision of the synchronization is OK. If the problem is still reported, then you have to check your as version, remember the version to correspond.

Android Error: (1, 0) Gradle version 2.2 is required. Current version is 3.4.1.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.