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.