在 Android Studio 中为 NDK 项目构建符号花费的时间太长 [英] Building Symbols for NDK project takes too long in Android Studio

查看:43
本文介绍了在 Android Studio 中为 NDK 项目构建符号花费的时间太长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个使用 NDK 并绑定相当大的 Boost C++ 库的 Android 项目.每次启动Android Studio,IDE在Building Symbols阶段都会花费大约1小时(或多或少,在i7四核机器上)的相当长的时间,在此期间实际上无法使用IDE.我想瓶颈与 Boost 中包含的大量符号直接相关.

I am working on an Android Project which makes use of the NDK and binds the rather large Boost C++ library. Upon every startup of Android Studio, the IDE takes a rather long time of about 1 hour (more or less, on an i7 quad-core machine) during the Building Symbols stage, during which it is effectively impossible to use the IDE. I guess the bottleneck is directly related to the huge number of symbols included in Boost.

是否有解决此问题的已知补救措施?我没有看到很多关于这个问题的抱怨,但这个论坛帖子似乎在寻求帮助解决同样的问题:https://forum.xda-developers.com/tools/android-studio/android-studio-2-2-add-cpp-files-using-t3499634

Is there a known remedy to this problem? I have not seen many complaints about this problem, but this forum post seems to ask for help for the same issue: https://forum.xda-developers.com/tools/android-studio/android-studio-2-2-add-cpp-files-using-t3499634

推荐答案

我面临着完全相同的问题 - 昨天将我的 Android Studio 安装升级到 2.3.3 后,现在打开我的项目至少需要 30 分钟的构建符号",此时 IDE 实际上毫无用处.

I am facing the exact same issue - after upgrading my Android Studio installation to 2.3.3 yesterday, opening my project now faces me with at least 30 mins of "building symbols" at which point the IDE is effectively useless.

我可以通过终端中的 gradle 命令构建项目,所以我不知道为什么这一步在 AS 中是强制性的.

I can build the project via gradle commands in terminal, so I have no idea why this step is mandatory in AS.

我读到这可能与使用 NDK 构建(Android.mk?)与 CMake(CMakeLists.txt)有关,但我还没有能够转换我的 .mk 文件来测试这一点.这是一个遗留项目,NDK 部分对我来说仍然有些神秘:(

I read that this may have something to do with using the NDK build (Android.mk?) vs. CMake (CMakeLists.txt), but I have not yet been able to convert over my .mk file to test this out. This is a legacy project, and the NDK portion is still somewhat of a mystery to me :(

这篇关于在 Android Studio 中为 NDK 项目构建符号花费的时间太长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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