ERROR: Gradle version 2.2 is required. Current version is 5.1.1
The android gradle plugin and the gradle version are linked.
Here you can find all info:
Plugin version Required Gradle version
1.0.0 - 1.1.3 2.2.1 - 2.3
1.2.0 - 1.3.1 2.2.1 - 2.9
1.5.0 2.2.1 - 2.13
2.0.0 - 2.1.2 2.10 - 2.13
2.1.3 - 2.2.3 2.14.1+
2.3.0+ 3.3+
3.0.0+ 4.1+
3.1.0+ 4.4+
3.2.0 - 3.2.1 4.6+
3.3.0 - 3.3.2 4.10.1+
3.4.0+ 5.1.1+
Use in your build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
}
and in the gradle-wrapper.properties
file
distributionUrl = https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
Gradle version 2.2 is required. Current version is 2.10
- Open
gradle-wrapper.properties
Change this line:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
with
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
- Go to
build.gradle
(Project: your_app_name) Change this line
classpath 'com.android.tools.build:gradle:XXX'
to this
classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
or
classpath 'com.android.tools.build:gradle:1.5.0'
- Don't click
Sync Now
- From menu choose
File -> Invalidate Caches/Restart...
- Choose first option:
Invalidate and Restart
Android Studio would restart. After this, it should work normally
Hope it help
Gradle version 2.2 is required. Current version is 2.0
May be you can just update gradle version? latest version is 2.6
http://gradle.org/
Gradle Version 2.10 is required. Error
You need to change File > Settings > Builds,Execution,Deployment > Build Tools > Gradle >Gradle home path
On Mac OS, change the path in Android Studio > Preferences > Builds,Execution,Deployment > Build Tools > Gradle >Gradle home
Or set Use default gradle wrapper and edit Project\gradle\wrapper\gradle-wrapper.properties
files field distributionUrl
like this
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
Related Topics
Android Emulator: How to Monitor Network Traffic
Difference Between Android-Support-V7-Appcompat and Android-Support-V4
Low-Latency Audio Playback on Android
Why Was "Avoid Enums Where You Only Need Ints" Removed from Android's Performance Tips
How to Display Input Errors in Popup
How to Create Custom UI for Android Mediacontroller
Navigation Drawer Semi-Transparent Over Status Bar Not Working
Android Persistence Room: "Cannot Figure Out How to Read This Field from a Cursor"
Jni and Gradle in Android Studio
How to Hide a Button Programmatically
How to Add a Fast-Scroller to the Recyclerview
How to Attach the Android Support Library Source in Eclipse
How to Style the Standard React-Native Android Picker
How to Set the Divider Between Tabs in Tablayout of Design Support Library
Why Mediaplayer Throws Not Present Error When Creating Instance of It
How to Open a PDF Stored Either in Res/Raw or Assets Folder
Clicking Hamburger Icon on Toolbar Does Not Open Navigation Drawer