Verbose build logs from Android Studio

限于喜欢 提交于 2020-07-08 12:57:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!