问题
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.
回答1:
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"
}
}
来源:https://stackoverflow.com/questions/44550342/verbose-build-logs-from-android-studio