Android Gradle sync failed

1

I have an old android project and want to bring it to life.

I downloaded android studio 2.0 I imported my project and nothing worked

error message.

14:22:37 Gradle sync failed: Gradle version 2.2 is required. Current version is 2.10. If using the gradle wrapper, try editing the distributionUrl in P:\AppData\Local\Android\Toobar\gradle\wrapper\gradle-wrapper.properties to gradle-2.2-all.zip.
         Please fix the project's Gradle settings.
         Consult IDE log for more details (Help | Show Log)

How to solve?

    
asked by anonymous 22.04.2016 / 19:30

2 answers

1

You'll need to use a newer version of gradle to build your apps. You are using version 2.10 and you are being asked for version 2.2.

I do not know how the settings in your IDE are, so I'll quote a few places to confirm that everything is OK.

Go to File > Settings > Builds, Execution, Deployment > Build Tools > Gradle> Gradle home and check if the option "Use default gradle wrapper (recommended)" is checked

Go to File > Project Structure > Project and place version 2.2.1 in the "Gradle version" field.

Check if it will solve. Anything, comment here!

    
22.04.2016 / 20:08
0

In mine I was having the same problem, I was in File > Settings > Builds, Execution, Deployment > Build Tools > Gradle> Gradle home and check if the option "Use default gradle wrapper (recommended)" is checked and was already correct, but in File > Project Structure > Project and put version 2.2.1 in the field of "Gradle version", I changed and solved my problem, thanks !!

    
14.10.2017 / 02:32