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

查看:63
本文介绍了来自 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天全站免登陆