Android Studio無法執行專案:app:transformClassesWithDependencyCheckerForDebug
阿新 • • 發佈:2018-11-09
專案之前執行正常,後莫名出現的一個如下一個錯誤,專案執行不起來
Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:assembleDebug] Error:Execution failed for task ':app:transformClassesWithDependencyCheckerForDebug'. > org.gradle.api.internal.changedetection.rules.DescriptiveChange cannot be cast to org.gradle.api.tasks.incremental.InputFileDetails he may 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: 13.259 secs Information:1 error Information:0 warnings Information:See complete output in console
解決方法如下:
切換專案至Project目錄---->刪除.gradle資料夾下的子檔案----->重新執行編譯即可