I have an Android App in Android Studio. When I build project with Gradle File,it gives me one error at compile time. Error Report:
Error:org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter$FileCollectionSnapshotImpl cannot be cast to org.gradle.api.internal.changedetection.state.OutputFilesCollectionSnapshotter$OutputFilesSnapshot
Please Give me solution about this error.
Using the Proxy Servers: There was an issue with the syncing of the Gradle when Proxy Servers were turned on. Disabling it can help. Cache Memory: Android Studio uses Cache memory for fast and smooth usage of the app. Sometimes the cache gets corrupted due to which Gradle sync fails.
Go to File > Settings > Build, Execution, Deployment > Compiler.
1.delete {project dir}/.gradle/{gradle distribution version dir}
{gradle distribution version dir} is whatever the gradle distribution version you use (ref: https://developer.android.com/studio/releases/gradle-plugin.html#revisions). For example, it can be "1.9" or "2.10" or some other version number.
2.Sync Project with Gradle File
This is what worked for me:
Android Studio -> File -> Invalidate Caches and Restart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With