Where are Gradle logs?

Gradle does not redirect its logs in a separate file in Android Studio.

Therefore if you want to view them in a file, you need to build gradle using a command in the terminal and redirect gradle input to a file.

gradlew build > myLogs.txt 2>&1

This command will redirect all standard output and error messages from gradle build to a file called myLogs.txt in the project folder.

gradlew build > myLogs.txt 2> logErrors.txt

This command will redirect all standard output from Gradle logs to the myLogs.txt and all error messages to logErrors.txt

Tested on Windows 10 and works perfectly.

Here is more information about how to redirect standard output from commands to different files.

Leave a Comment