Error:org.gradle.api.internal.changedetection.state.FileCollectionSnapshotImpl cannot be cast to org
androidStudio上R提示:Can't resolve symbol ‘R’ ,并出現(xiàn)如下錯(cuò)誤:
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.
解決方法,進(jìn)入到androidStudio的項(xiàng)目根目錄,進(jìn)入.gradle目錄,刪除掉數(shù)字開(kāi)頭的目錄(2.14.1 ? ?3.14.1):
在androidstudio中點(diǎn)擊Tools -- ?Android --Sync project with gradle files
到此,問(wèn)題達(dá)到解決
總結(jié)
以上是生活随笔為你收集整理的Error:org.gradle.api.internal.changedetection.state.FileCollectionSnapshotImpl cannot be cast to org的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: jenkins配置git出现ERROR:
- 下一篇: mac下androidStudio 运行