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.
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.
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).
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"
}
}
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