Fixing Gradle Malformed Input Around Byte Error


While working with Gradle build from the terminal, IntelliJ Idea, or Eclipse time we get the error “Malformed Input Around Byte Error 26” or some at other indexes. It displayed only a single-line error message without any clue.

The cause for this error is a corruption of files in Gradle caches and or daemon folder which prevents Gradle daemon to start. To resolve this problem you need to delete these folders and run the Gradle command again. It will create daemon and caches again.

You can try to first clear the cache if the problem still occurs then delete the daemon folder also.

Clearing Gradle Cache

You can find the Gradle cache at the following location

  • On Windows: %USERPROFILE%\.gradle\caches
  • On Mac / UNIX: ~/.gradle/caches/

You can browse to this directory and delete using GUI or on UNIX systems, the following commands

rm -r $HOME/.gradle/caches/

alternatively, you can clear this by using the Gradle command

On Windows:

gradlew cleanBuildCache

On Mac or UNIX:

./gradlew cleanBuildCache

If the problem still occurs then remove the Deamon folder inside the .gradle folder also.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.