Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ndk-build DUMP_APP_ABI returns 2 lines on Windows

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

like image 821
Max Avatar asked Oct 01 '22 23:10

Max


1 Answers

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
like image 70
Alex Cohn Avatar answered Oct 22 '22 18:10

Alex Cohn