ndk-build DUMP_APP_ABI returns 2 lines on Windows

风流意气都作罢 提交于 2020-01-03 13:38:44

问题


I can't debug android ndk app on Windows. It seems it is a new line problem on Windows

c:\Android\android-ndk-r9c\samples\hello-jni>..\..\ndk-build DUMP_APP_ABI
all

c:\Android\android-ndk-r9c\samples\hello-jni>

On Linux it is

hello-jni$ ../../ndk-build DUMP_APP_ABI
all
hello-jni$

There is no line after all on Linux

I use unmodified hello-jni from android-ndk-r9c

I also compared size of every unzipped file and they are original. It is clean unmodified NDK from Google. It is able to compile and do JavaDebug but not NativeDebug. (on Windows)

My questions is: What I am doing wrong? Does someone can confirm that unmodifed Android NDK r9c (latest today) is able to do native debugging with Eclipse+NDKPlugin.

PS I forgot to mention that when I do Native Debug I get

[2013-11-18 14:38:50 - HelloJni] Unknown Application ABI: 
[2013-11-18 14:38:50 - HelloJni] 
[2013-11-18 14:38:50 - HelloJni] Unable to detect application ABI's

Just like in that question


回答1:


My understanding is that the the issue is which make is used by ndk-gdb. See ndk-gdb on windows: when cygwin's make is used, all well; if cygwin make is not installed, ndk-gdb fails. Here is the summary from Debugging Android NDK, Under Windows:

  1. add android:debuggable="true" flag to <application tag in AndroidManifest.xml
  2. in cmd (windows' command prompt): invoke ndk-build with NDK_DEBUG=1
  3. in cygwin bash: run ndk-gdb


来源:https://stackoverflow.com/questions/20981845/ndk-build-dump-app-abi-returns-2-lines-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!