Android Gradle Sync failed

Asked

Viewed 9,143 times

2

I have an old android project and I intend to give life to it.

downloaded android studio 2.0 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?

2 answers

1

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

I don’t know how the settings are in your IDE, so I’m going to cite a few places to confirm that everything is OK.

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

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

Check if it will solve. Anything, comment here!

  • 1

    Good evening my friend, Thank you so much for your help. I switched the version and it worked correctly Go to File > Project Structure > Project and put version 2.2.1 in the "Gradle version".

0

In mine was with the same problem, I went to 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, however in File > Project Structure > Project and put the version 2.2.1 in the field of "Gradle version", changed and solved my problem, thanks!!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.