来自Android Studio的详细构建日志 [英] Verbose build logs from Android Studio

查看:460
本文介绍了来自Android Studio的详细构建日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用Android Studio进行构建时,如何获取详细的日志(包括编译器和链接器的命令行参数)?

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

我刚刚从Ant/Android.mk版本过渡到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

要实现此目的,Android Studio中的等效设置是什么? 我怀疑我的项目是针对错误的GLES版本(用gles2而不是gles3)构建的,并希望通过查看链接器的命令行参数来确定.

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.

推荐答案

事实证明,您可以通过如下更改build.gradle文件来使构建变得冗长:

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

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

在使用ndk-build代替cmake时,请改用此命令:

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

    externalNativeBuild {
        ndkBuild {
            arguments "V=1"
        }
    }

这篇关于来自Android Studio的详细构建日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆