我在 Android Studio 中有一个 Android 应用。当我使用 Gradle File 构建项目时,它在编译时给了我一个错误。 错误报告:
Error:org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter$FileCollectionSnapshotImpl cannot be cast to
org.gradle.api.internal.changedetection.state.OutputFilesCollectionSnapshotter$OutputFilesSnapshot
请给我解决这个错误的方法。
最佳答案
1.delete {project dir}/.gradle/{gradle 分发版本目录}
{gradle distribution version dir} 是您使用的任何 gradle 发行版版本(引用:https://developer.android.com/studio/releases/gradle-plugin.html#revisions)。例如,它可以是“1.9”或“2.10”或其他版本号。
2.使用 Gradle 文件同步项目
关于编译时的 Android Studio Gradle 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26354153/