[英]How to set the local cpp source path in Android studio for prebuild library
I created an App which includes our source code as a native lib (so-file). 我创建了一个应用程序,其中包含源代码作为本机lib(so-file)。 I'm able to step into it and everything works fine so far with this code. 我能够介入其中,到目前为止,使用此代码可以正常工作。
This native lib links against another native lib which was pre-build on a different machine and which I copied into the jni-abi-folder. 这个本机库链接到另一个本机库,该本机库是在另一台计算机上预先构建的,并且我将其复制到jni-abi-folder中。 I have checked out the svn-repository of this so-file in a different folder parallel to my project and need to be able to debug also into it. 我已经在与我的项目平行的另一个文件夹中检出了该so-file的svn存储库,并且需要能够对其进行调试。
When I now do a break, I can see the method names in the callstack so I assume that the symbols can be loaded, but Android Studio doesn't know where to find the source files. 当我现在休息时,我可以在调用堆栈中看到方法名称,因此我假设可以加载符号,但是Android Studio不知道在哪里可以找到源文件。
Under Visual Studio, when I did a break, I could specify the symbols in the symbol path and then an error was displaced that I should navigate to the corresponding source file. 在Visual Studio中,当我休息时,可以在符号路径中指定符号,然后替换错误,我应该导航到相应的源文件。 Then I only needed to navigate to the folder and it was working. 然后,我只需要导航到该文件夹即可。
How can this be done with Android Studio - I have the newest version 3.2.1 installed. 如何使用Android Studio做到这一点-我安装了最新的3.2.1版本。
I finally found the solution. 我终于找到了解决方案。
There should be a way to find out the original source directory from the so file, but I don't know it right now. 应该有一种方法可以从so文件中找到原始源目录,但是我现在不知道。
I hope this can help somebody else 我希望这可以帮助其他人
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.