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 ?
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.
You should stay at the sensible level of 2–4 gigabytes for gradle and 1–2 for dex.
it removes build folder, as well configure your modules and then build your project. i use it before release any new app on playstore.
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.
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.
try below way, add one of these --info, --stacktrace, --debug
in command line option
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