Error:org.gradle.api.internal.changedetection.state.FileCollectionSnapshotImpl cannot be cast to org
androidStudio上R提示:Can't resolve symbol ‘R’ ,并出現如下錯誤:
Error:org.gradle.api.internal.changedetection.state.FileCollectionSnapshotImpl cannot be cast to org.gradle.api.internal.changedetection.state.OutputFilesCollectionSnapshotter$OutputFilesSnapshot
Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache 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.
解決方法,進入到androidStudio的項目根目錄,進入.gradle目錄,刪除掉數字開頭的目錄(2.14.1 ? ?3.14.1):
在androidstudio中點擊Tools -- ?Android --Sync project with gradle files
到此,問題達到解決
總結
以上是生活随笔為你收集整理的Error:org.gradle.api.internal.changedetection.state.FileCollectionSnapshotImpl cannot be cast to org的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: jenkins配置git出现ERROR:
- 下一篇: mac下androidStudio 运行