[英]Cannot debug Android application with native code
I'm trying to debug native application in Eclipse. 我正在尝试在Eclipse中调试本机应用程序。 Unfortunately, when I run "Debug As-> Android Native Application" I see the following errors in the console:
不幸的是,当我运行“ Debug As-> Android Native Application”时,在控制台中看到以下错误:
[2014-09-10 21:03:48 - GenderDetector] Verify if the application was built with NDK_DEBUG=1
[2014-09-10 21:04:16 - GenderDetector] gdbserver output:
[2014-09-10 21:04:16 - GenderDetector] run-as: Package 'com.opencv.genderdetector' is unknown
If I try to add "NDK_DEBUT=1" to the ndk-build command I see the following errors: 如果我尝试将“ NDK_DEBUT = 1”添加到ndk-build命令中,则会看到以下错误:
[armeabi-v7a] Gdbserver : [arm-linux-androideabi-4.9] libs/armeabi-v7a/gdbserver
install: cannot stat ‘/home/yury/software/android-ndk/prebuilt/android-arm/gdbserver/gdbserver’: No such file or directory
make: *** [libs/armeabi-v7a/gdbserver] Error 1
Could someone please explain what I'm doing wrong? 有人可以解释我在做什么错吗?
Here is a steps that may help you : 以下步骤可以为您提供帮助:
Regards. 问候。
Build your application like this : ndk-build NDK_DEBUG:=1 APP_OPTIM:=debug This enables the debug flag and also creates symbol files used by the debugger. 像这样构建应用程序:ndk-build NDK_DEBUG:= 1 APP_OPTIM:= debug这将启用调试标志并创建调试器使用的符号文件。 You will see 2 files gdbserver.so and gdb.setup created within jni/libs folder.
您将在jni / libs文件夹中看到2个文件gdbserver.so和gdb.setup。 After this is done, you are good to debug as native application.
完成此操作后,您可以将其调试为本机应用程序。
I meet this error when I use android-ndk-r10. 使用android-ndk-r10时遇到此错误。 After I uses android-ndk-r10e, this error disappear.
使用android-ndk-r10e后,此错误消失。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.