[英]Cannot debug android native code built on android library on eclipse
I have been struggling with this for 3 days and I could not get it done. 我一直在努力奋斗3天,我无法完成它。
I have an android project that links to an android library, containing native code, on eclipse. 我有一个android项目链接到一个包含本机代码的android库,在eclipse上。
I saw this question , which is the same schema as mine, but the steps proposed there would not work. 我看到了这个问题 ,这与我的模式相同,但是那里提出的步骤是行不通的。
I rewrite the steps here, which are: 我重写了这里的步骤,它们是:
First problem was, I could not set up Debug config for native app if the application is not set up as native, (only links to a native app), so I cannot select any project to debug. 第一个问题是,如果应用程序未设置为本机应用程序(仅链接到本机应用程序),我无法为本机应用程序设置Debug配置,因此我无法选择任何要调试的项目。
I tried setting the android app project as having c/c++ nature, with dummy jni/Android.mk, as just not showing any error on build. 我尝试将Android应用程序项目设置为具有c / c ++特性,使用虚拟jni / Android.mk,因为在构建时没有显示任何错误。 (I doubt this is the right way to go, though)
(我怀疑这是正确的方法)
The app then runs and links correctly, and I am able to follow those steps --1 to 5. But as I debug it, the console shows (BasicCharacterWithLib is the name of the app): 该应用程序然后运行并正确链接,我能够按照这些步骤--1到5.但是当我调试它时,控制台显示(BasicCharacterWithLib是应用程序的名称):
[2014-05-27 12:18:09 - BasicCharacterWithLib] Error while obtaining file from device
[2014-05-27 12:18:09 - BasicCharacterWithLib] com.android.ddmlib.SyncException: Writing local file failed!
And it would never stop on any breakpoint (native or not) 并且它永远不会停在任何断点上(原生或不是)
I am also aware of this other question , having the same symptoms on a different configuration (directly executing an app), but it remains unanswered. 我也知道另一个问题 ,在不同的配置(直接执行应用程序)上具有相同的症状,但它仍然没有答案。
I have successfully debugged another app in the same device, a test app having native code inside it, so I guess the problem cannot be due to the device config. 我已经成功调试了同一个设备中的另一个应用程序,一个测试应用程序里面有本机代码,所以我猜问题不能归因于设备配置。
Do you know how to solve it? 你知道怎么解决吗?
some further details: 更多细节:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.