Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Verbose build logs from Android Studio

Tags:

How do I get a verbose log (including the command-line arguments to compiler and linker) when building with Android Studio?

I have just transitioned from Ant / Android.mk builds to Android-Studio builds. With the old system, I was able to see how the compiler was evoked by doing:

$ ndk-build V=1

What would be the equivalent setting in Android Studio to accomplish this? I have a suspicion that my project is building against the wrong GLES version (gles2 instead of gles3) and want to make sure by seeing the command line arguments to the linker.

like image 989
Bram Avatar asked Jun 14 '17 16:06

Bram


People also ask

What is a verbose log?

In software, verbose logging is the practice of recording to a persistent medium as much information as you possibly can about events that occur while the software runs. It's also worth mentioning that verbose logging is generally a mode that you can toggle on and off.

How to get logcat in Android Studio?

Logcat window in Android Studio is used to display real-time system messages and messages that are added in the Log class of the app. To open Logcat Click View > Tool Windows > Logcat (Alt + 6 or from the toolbar window).


1 Answers

It turns out you can make the build verbose by changing the build.gradle file as follows:

    externalNativeBuild {
        cmake {
            arguments "-DCMAKE_VERBOSE_MAKEFILE=1"       
        }
    }

When using ndk-build instead of cmake, use this instead:

    externalNativeBuild {
        ndkBuild {
            arguments "V=1"
        }
    }
like image 88
Bram Avatar answered Oct 01 '22 05:10

Bram