1

I was getting 'Unable to detect application ABI's' when trying to natively debug in Eclipse. I didn't get anywhere so I tried ndk-gdb (ndk-gdb.py as I am on Windows).

But using ndk-gdb gives me :

ERROR: The device does not support the application's targetted CPU ABIs!

       Device supports:  armeabi-v7a armeabi

       Package supports: .

This happens because the ndk-gdb.py function :

def get_build_var(var):
    global GNUMAKE_CMD, GNUMAKE_FLAGS, NDK, PROJECT
    text = subprocess.check_output([GNUMAKE_CMD,
                                  '--no-print-dir',
                                  '-f',
                                  NDK+'/build/core/build-local.mk',
                                  '-C',
                                  PROJECT,
                                  'DUMP_'+var] + GNUMAKE_FLAGS
                                  )                                  

    # replace('\r', '') due to Windows crlf (\r\n)
    #  ...universal_newlines=True causes bytes to be returned
    #     rather than a str
    return text.decode('ascii').replace('\r', '').splitlines()[0]

returns a '.' when asked for APP_ABI. I have dummped the subprocess make call parameters and when I execute the make call from the command line I get the correct response of 'armeabi-v7a armeabi'

I don't think this is to do with python as the error is so similar to my Eclipse only problem.

Funky Oordvork
  • 403
  • 4
  • 15
  • possible duplicate of [ndk-gdb error: device does not support the application's targetted CPU ABIs](http://stackoverflow.com/questions/15067215/ndk-gdb-error-device-does-not-support-the-applications-targetted-cpu-abis) – krsteeve Oct 31 '13 at 17:12
  • 1
    @krsteeve: no, it's a different trouble – Alex Cohn Oct 31 '13 at 17:50
  • Eclipse uses same python under the hood – Alex Cohn Oct 31 '13 at 17:51
  • 1
    Try to run `ndk-build DUMP_APP_ABI` and make sure the output is clean. Check you Application.mk for weird encoding and/or CRLFs. – Alex Cohn Oct 31 '13 at 18:01
  • @Alex Cohn - ndk-build DUMP_APP_ABI shows output from android.mk file then armeabi-v7a armeabi. I have tried with and without CRLF after APP_ABI line in application.mk, which is correct ? – Funky Oordvork Oct 31 '13 at 20:03
  • 1
    What do you mean "output from android.mk file"? My project gives the following: http://pastebin.com/9Q0jsPNk. Any other character in output will drive `ndk-gdb` nuts. – Alex Cohn Nov 01 '13 at 20:09
  • It is just output from $(info) commands – Funky Oordvork Nov 01 '13 at 20:27
  • 1
    I think you have prodded me in the right direction ! The first line is $(info .). Thank You ! If you put that as an answer I'll give you a tick. – Funky Oordvork Nov 01 '13 at 20:48

1 Answers1

2

Try to run ndk-build DUMP_APP_ABI and make sure the output is clean. Check you Application.mk for weird encoding and/or CRLFs.

All use of $(info …) or $(__ndk_info), etc. should be disabled for this target.

Alex Cohn
  • 56,089
  • 9
  • 113
  • 307