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

Amp*_*nda 6 android gradle android-gradle-plugin

今天我将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
Run Code Online (Sandbox Code Playgroud)

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

Sab*_*h.M 15

删除.gradle文件夹,然后清理并运行...也许它会对你有所帮助.谢谢.


not*_*low 5

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

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

  3. 删除.gradle文件夹

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