无法运行项目应用程序(Gradle Build Failed)

时间:2016-09-21 07:42:35

标签: android gradle android-gradle

今天我将我的Android Studio更新为2.2 ..我不确定这是因为更新,但是当我运行应用程序时出现此错误

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

我试图清理并重建应用程序,但没有任何影响

2 个答案:

答案 0 :(得分:14)

删除.gradle文件夹,然后清理并运行......也许它会为您提供帮助。感谢。

答案 1 :(得分:5)

  1. 关闭Android Studio,如果已打开

  2. 转到项目工作区(例如:C:\ wheverever \ it \ is \ TheProjectName)

  3. 删除 .gradle 文件夹

  4. 打开Android Studio。 清理并构建您的项目。