是否有可能在Android的工作室来调试C / C ++? [英] Is it possible to debug C/C++ in Android Studio?
问题描述
我正在写一个Android应用程序,包括编译沿着Java的code C / C ++ code。原生code中的执行过程中我的应用程序崩溃。
I'm writing an Android app that includes C/C++ code that is compiled alongside the Java code. My app is crashing during the execution of the native code.
有没有一种方法步骤通过Android的C / C ++源代码,检查变量,因为它有可能与Java源?
Is there a way to step through Android C/C++ source and inspect variables as it is possible with Java source?
我不一定要找一个办法从Android的工作室的中单步执行源的。这显然是理想的解决方案,但是,如果我需要开始从Studio中的应用程序后,使用外部工具,这很好。我希望能够步执行的行由行和检查变量。
I am not necessarily looking for a way to step through the source from within Android Studio. That is obviously the ideal solution, however, if I need to use an external tool after starting the app from Studio, that's fine. I want to be able to step through the execution line-by-line and inspect variables.
Android的工作室1.0.2
的Android NDK r10d
Android Studio 1.0.2
Android NDK r10d
编辑:从使用Eclipse与ADT插件即时响应词干,让我增加更多的要求
。
这个项目开始作为一个Eclipse ADT的项目。不过,我现在已经移植到Android的工作室。我的项目现已建成使用摇篮,我的项目的目录结构反映了这一点。我愿意用Eclipse;我的不可以愿意改变为了我的项目结构,以恢复从Android的工作室到Eclipse。如果有办法打开了Android Studio项目在Eclipse和调试这样的说法,请详细说明这个过程。
Stemming from the immediate response of, "Use Eclipse with ADT plugin", let me add more requirements.
This project started as an Eclipse ADT project. However, I have now migrated to Android Studio. My project is now built using Gradle, and my project directory structure reflects this. I am willing to use Eclipse; I am not willing to change my project structure in order to revert to Eclipse from Android Studio. If there is a way to open the Android Studio project in Eclipse and debug it that way, please elaborate on the process.
推荐答案
随着版本1.3 + preVIEW的Android Studio支持C ++的调试,引用的 Android的中号开发preVIEW和放大器;工具的:
As of version 1.3+ Preview Android Studio supports C++ debugging, quoting Android M Developer Preview & Tools:
最值得注意的是,从我们的Android NDK和放大器更要求的功能;游戏开发商:code编辑和调试C / C ++ code。基于JetBrains的克利翁的平台,在Android NDK工作室提供的插件功能,如C / C ++ code旁边的Java code重构和code完成。 Java和C / C ++ code支持集成到免费的Android应用程序开发的一个开发经验。
Most notable is a much requested feature from our Android NDK & game developers: code editing and debugging for C/C++ code. Based on JetBrains Clion platform, the Android Studio NDK plugin provides features such as refactoring and code completion for C/C++ code alongside your Java code. Java and C/C++ code support is integrated into one development experience free of charge for Android app developers.
这篇关于是否有可能在Android的工作室来调试C / C ++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!