Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot run project app (Gradle Build Failed)

today I updated my Android Studio to 2.2.. I'm not sure this is because of update but I got this error when I run the app

Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:assembleDebug]
Error:Execution failed for task ':app:transformClassesWithJavaResourcesVerifierForDebug'.
> org.gradle.api.internal.changedetection.rules.DescriptiveChange cannot be cast to org.gradle.api.tasks.incremental.InputFileDetails
ay be corrupt (this sometimes occurs after a network connection timeout.)
<a href="syncProject">Re-download dependencies and sync project (requires network)</a></li><li>The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
<a href="stopGradleDaemons">Stop Gradle build processes (requires restart)</a></li><li>Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.</li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
Information:BUILD FAILED
Information:Total time: 7.336 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

I was trying to clean and rebuild app but there was nothing affect

like image 971
Ampersanda Avatar asked Sep 21 '16 07:09

Ampersanda


People also ask

How fix Gradle build failed?

You can resolve gradle by going C:\Users\(user name path)\. gradle and delete this . gradle file build again and make sure you are connected to internet.

Why is my Gradle build failing?

In some cases when your Gradle files are deleted or corrupted you will not be able to download new Gradle files in android studio. In this case, we have to delete the Gradle files which are present already and then again sync your project to download our Gradle files again.


2 Answers

Delete .gradle folder then clean and run... maybe it'll help for you. Thanks.

like image 166
Sabish.M Avatar answered Oct 22 '22 09:10

Sabish.M


  1. Close Android Studio, if it's opened

  2. Go to the project workspace (Eg: C:\wheverever\it\is\TheProjectName)

  3. Delete .gradle folder

  4. Open Android Studio. Clean and build your project.

like image 6
not_again_stackoverflow Avatar answered Oct 22 '22 10:10

not_again_stackoverflow