Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Add Stacktrace or debug Option when Building Android Studio Project

People also ask

How do I run Stacktrace in eclipse?

bat'' * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Where is compiler error output Android studio?

If you don't see it there, use View > Tool Windows > Gradle. Go to File > Settings > Build, Execution, Deployment > Compiler.


You can use GUI to add these gradle command line flags from

File > Settings > Build, Execution, Deployment > Compiler

For MacOS user, it's here

Android Studio > Preferences > Build, Execution, Deployment > Compiler

like this (add --stacktrace or --debug)

enter image description here

Note that the screenshot is from before 0.8.10, the option is no longer in the Compiler > Gradle section, it's now in a separate section named Compiler (Gradle-based Android Project)


On the Mac version of Android Studio Beta 1.2, it's under

Android Studio->preferences->Build, Execution, Deployment->Compiler


In Android Studios 2.1.1, the command-line Options is under "Build, Execution, Deployment">"Compiler"

enter image description here


What I use for debugging purposes is running the gradle task with stacktrace directly in terminal. Then you don't affect your normal compiles.

From your project root directory, via terminal you can use:

./gradlew assembleMyBuild --stacktrace