Native Debug Android Studio

Вла*_*цев 7 android native adb android-ndk

当我通过Genymotion运行Native调试时出现了这样的错误.

Starting LLDB server: run-as org.cocos2dx.cpp_empty_test 
  /data/data/org.cocos2dx.cpp_empty_test/lldb/bin/start_lldb_server.sh 
  /data/data/org.cocos2dx.cpp_empty_test/lldb 
  /data/data/org.cocos2dx.cpp_empty_test/lldb/tmp/platform.port1442313534865 
  "lldb process:gdb-remote packets"
Now Launching Native Debug Session
Attention! No symbol directories found - please check your native debug configuration
Failed to attach native debugger: Invalid URL: adb://[169.254.67.102:5555]:46216
Invalid URL: adb://[169.254.67.102:5555]:46216
Process finished with exit code 0

Jac*_*iao 6

我遇到了同样的问题,我得到了解决它的解决方案。但我不确定解决方案是否适合您。我的解决方案是:在调试配置中添加 so 路径。1. 打开“运行/调试配置”对话框;2. 单击“调试器”选项卡;3.用你的so路径添加“符号目录”。

我的配置如下在此处输入图片说明


小智 3

你可以试试这个:

1.在应用程序/build.gradle中:

在依赖项标签处:

releaseCompile project(path: ':youModuleName', configuration: 'release')
debugCompile project(path: ':youModuleName', configuration: 'debug')
Run Code Online (Sandbox Code Playgroud)

2.在youModule/build.gradle中:

在安卓标签上:

publishNonDefault true
Run Code Online (Sandbox Code Playgroud)

演示:

https://github.com/sunalong/JNIDemo