Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle console - get more log output

I am using Android studio. In the gradle console getting the below error message

Compilation error. See log for more details

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

But where to run --info option to see the more log ?

like image 229
Shanki Bansal Avatar asked Feb 20 '16 09:02

Shanki Bansal


People also ask

How do I get 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. This command will redirect all standard output and error messages from gradle build to a file called myLogs.

How much RAM should I allocate to Gradle?

You should stay at the sensible level of 2–4 gigabytes for gradle and 1–2 for dex.

What does Gradlew clean do?

it removes build folder, as well configure your modules and then build your project. i use it before release any new app on playstore.

What is FileTree in Gradle?

A FileTree represents a hierarchy of files. It extends FileCollection to add hierarchy query and manipulation methods. You typically use a FileTree to represent files to copy or the contents of an archive. You can obtain a FileTree instance using Project.


2 Answers

This question was written a couple of years ago but the answer is still relevant with the latest upgrade to Android Studio 3.1.3. I noticed that I couldn't see the gradle logs, and after some hunting and pecking I found that you can show and hide the gradle logs with the little button shown in the attached screenshot. It's not very well advertised, so if you're missing gradle logs then cycle that button. Toggle Gradle Log View

like image 121
Coder Roadie Avatar answered Sep 22 '22 09:09

Coder Roadie


try below way, add one of these --info, --stacktrace, --debug in command line option

enter image description here

like image 37
Dhaval Parmar Avatar answered Sep 21 '22 09:09

Dhaval Parmar