- Stop Gradle Daemons + Delete cache directory + Delete build directory.
./gradlew --stop && rm -rf ~/.gradle/caches/build-cache/ && ./gradlew clean
- If you don't have gradle wrapper - install it:
gradle wrapper
./gradlew --stop && rm -rf ~/.gradle/caches/build-cache/ && ./gradlew clean
gradle wrapper