Click here to Skip to main content
14,218,548 members
Rate this:
Please Sign up or sign in to 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.
Posted
Updated 19-Sep-18 1:48am
v2
Comments
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.
Rate this:
Please Sign up or sign in to vote.

Solution 1

:) 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:

<project>/gradle/wrapper/gradle-wrapper.properties

Edit the distributionUrl line and set it too:

distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-all.zip

Rebuild your project.

</project>


dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'

        // 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 http://tools.android.com/recent

after it i build a this site project successfully.
see image see snapshot ptoject
thanks for attention
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

Sorry, I tryied asking question.
   
v2
Comments
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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100