There is no error in the code. But the build fails with the following error:
Error:Could not read entry ':app:packageDebug' from cache taskArtifacts.bin (/Users/sibidharan/Developer/Android Dev/Karpagam/.gradle/2.10/taskArtifacts/taskArtifacts.bin).
> java.io.EOFException (no error message)
I am using Android Studio 2.0 Preview 9 on OS X 10.11.3
Clear your project directoryClear the cache of Android Studio using “File -> Invalidate Caches / Restart” choose “Invalidate and restart option” and close Android Studio. Remove your . gradle directory from the root of your project. It contains some Gradle cache files.
gradle/gradle. properties : ? If we want to disable the build cache feature set via the global property we can use the command-line option --no-build-cache to disable the build cache for a particular build.
By default, it's located at ~/. gradle/caches . It's shared between any Gradle projects you work on, allowing Gradle to reuse task outputs from any earlier build of any other projects.
Removing the project-local .gradle
folder did it for me. It was then recreated during the next build and all was fine again.
UPDATE:
This answer helps.
Gradle cache locates at
You can browse to these directory and manually delete it or run
rm -rf $HOME/.gradle/caches/
on Unix or OS X system.
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