Android Studio: Where is the Compiler Error Output Window?
When I 'Run' my project in Android Studio, in the 'Messages' window, I get:
Gradle:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':play01:compileDebug'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
It says > Compilation failed; see the compiler error output for details.
So where is the "compiler error output"? And/Or how do I run with --stacktrace
option?
For Android Studio 3.1, select the icon below the Build one in the Build window.
By Android Studio 3.3 (possibly in 3.2.1), the icon has changed, though the location is the same:
The build window should open when you run a build action (e.g. from the Build menu). If you don't see it, you can try the "Build" button along the bottom of the window (also visible in the above screenshots), or through the menus View → Tool Windows → Build.
This answer is outdated. For Android 3.1 Studio go to this answer
One thing you can do is deactivate the external build. To do so click on "compiler settings icon" in the "Messages Make" panel that appears when you have an error. You can also open the compiler settings by going to File -> Settings -> Compiler. (Thanx to @maxgalbu for this tip).
Uncheck "Use External build"
And you will see the errors in the console
EDIT: After returning to "internal build" again you may get some errors, you can solve them this way: Android Studio: disabling "External build" to display error output create duplicate class errors
It's really straightforward to set up! Just go to the Compiler settings at Android Studio 2.2.3 and set the --stacktrace
command:
Then run the app again