Failed to complete Gradle execution cause: org/gra

2019-09-15 16:47发布

问题:

I am new to Android and while I am building project I am getting this type of error:

Failed to complete Gradle execution cause: org/gradle/Internal/TrueTimeProvider

I searched a lot through Google and Stack Overflow but no help.

回答1:

Try performing a clean build from build->clean project



回答2:

Download any gradle of version greater than 3.2 link : https://services.gradle.org/distributions/

Extract it and save it in a suitable place in your computer. Open android studio and open settings.

File->Settings->Build,Execution,Deployment->Gradle

on the right side choose or select Use local gradle distribution and then browse to where you had saved your downloaded extracted gradle click apply, then ok.

Don't forget to invalidate cache if you have some trouble using File -> Invalidate Cache / Restart



回答3:

For me was fixed removing this from my app build.gradle:

buildtimetracker {
    reporters {
        csv {
            output "build/times.csv"
            append true
            header false
        }

        summary {
            ordered false
            threshold 50
            barstyle "unicode"
        }

        csvSummary {
            csv "build/times.csv"
        }
    }
}

and this

classpath "net.rdrei.android.buildtimetracker:gradle-plugin:0.8.0"