Click here to Skip to main content
15,846,977 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,erorr gradle and error gradle
when i downloaded a old github project,for building in new version android studio and new version gradle error and errors.
really how can i build android project with gradle new version?
i am confused,what is talked gradle is much better ant in eclipse?
please give me a good solution

What I have tried:

i tested some solution but they aren't general way.
Updated 19-Sep-18 2:48am
Richard MacCutchan 22-Mar-16 11:07am    
Try creating a new project and add the source code only, and see what happens when you build it.

In future, if you have errors, please provide the context and also the full text. We cannot guess what is happening on your system.
stackprogramer 22-Mar-16 11:21am    
@Richard MacCutchan thanks for reply.but we had not this problem in Qt ,for old project .it is bad way that old project management is hard.i
has a solution delete gradle and .gradle folder for deleting building prior stage.but i don't know it will work or ......
Richard MacCutchan 22-Mar-16 11:54am    
Only one way to find out.

:) hi for doing this:we should set some property true:
change set buildToolsVersion
Look in the SDK Manager what is your highest Android SDK Build-tools version, and copy this version number in your project build.gradle file, in the android/buildToolsVersion property (for me, version was "18.1.1").

change gradle version:

Open up this file in your project:


Edit the distributionUrl line and set it too:


Rebuild your project.


dependencies {
        classpath ''

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files

how to see android plugin version and gradle version
File->Project Structure->Project pane->"Android plugin version".

Make sure you don't confuse the Gradle version with the Android plugin version. The former is the build system itself, the latter is the plugin to the build system that knows how to build Android projects

But when using the gradle plugin 0.7.+, Android Studio needs Gradle 1.8. So, you have to update Gradle from 1.7 to 1.8. This was done by going to Tools -> Android -> Sync Project with Gradle Files It forces Android Studio to give out Error message you see on

after it i build a this site project successfully.
see image see snapshot ptoject
thanks for attention
Share this answer
Today I have tried to resolve my problem with old Android project.
But Solution 1 has not helped me.
After I had changed Gradle version in files C:\path to project\AddressBook\gradle\wrapper\

so as:


I received error in Android Studio 3.6.2

org.gradle.tooling.BuildException: Gradle version 2.2 is required. Current version is 5.6.4. If using the gradle wrapper, try editing the distributionUrl in C:\path to project\AddressBook\gradle\wrapper\ to

So I have returned old Gradle version - 2.4
File->Project Structure->Project pane->"Gradle version".

But I have problem with import classes in one .java file in this old project.
Share this answer
Sorry, I tryied asking question.
Share this answer
Richard Deeming 20-Sep-18 10:01am    
If you want to ask a question, then ASK A QUESTION[^].

DO NOT post your question as a "solution" to someone else's question!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900