I'v got such problem:
[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
This problem occures on every project, which I am trying to debug 'as native'. I have seen this, this and this topics, but this solutions have not brought any effect in my case.
On other computer or on a VM the same project runs fine with the same settings.
Manifest
...
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="14" />
<application android:label="@string/app_name"
android:debuggable="true">
...
Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := hello-jni
LOCAL_SRC_FILES := hello-jni.cpp
include $(BUILD_SHARED_LIBRARY)
Verison in Project options also has been set to api-14.
I'v also downloaded new version of eclipse, sdk, ndk. I cleaned all system-wide variables and PATH elements. My machine runs under win7x64.
PS. Problem occures only if I am trying to debug, when i build and run it - it runs great.
Edit1 this is my ndk-build DUMP_APP_ABI
outline
c:\Users\Usr\workspace\HelloJni>D:\ndk\ndk-build.cmd DUMP_APP_ABI
armeabi
c:\Users\Usr\workspace\HelloJni>
Edit2 Important notice. I'v tried to run debug as native
on different machines with next steps git clone
-> import to ide -> Debug as native. All machines have nearly the same configuration (Win7 is common for all of them). This problem was only on my computer.
I'v tried different IDEs(eclipse+cdt, adt), cleaned path
, checked line endings.
Finnaly I desided to develop native part of code under linux VM. It was my solution. Also I didn't need cygwin anymore to crosscompile some libraries.
On Windows especially, it could be because one of the files (project.properties, Application.mk, Android.mk, or AndroidManfest.xml) has wrong line endings (CRLF). You run ndk-build DUMP_APP_ABI
and make sure the output is clean.
All use of $(info …)
or $(__ndk_info)
, etc. should be disabled for this target.
ABI detection logic placed in com.android.ide.eclipse.ndk
plugin com.android.ide.eclipse.ndk.internal.NdkHelper
class. In fact, it looks at output of command
make --no-print-dir -f $NDK_ROOT/build/core/build-local.mk -C $PROJECT_ROOT DUMP_APP_ABI
And if output doesn't contains valid ABI you will see message (or messages) like:
[$DATE $TIME - $PROJECT] Unknown Application ABI:
[$DATE $TIME - $PROJECT] $ANY
[$DATE $TIME - $PROJECT] Unable to detect application ABI's
First of all run manually command
make --no-print-dir -f $NDK_ROOT/build/core/build-local.mk -C $PROJECT_ROOT DUMP_APP_ABI
If output contains error fix it before. If this command works right it should produce space-separated ABIs, like this:
x86 armeabi
Especially in my case, I have missing environment variable for GStreamer
. So to fix this I specified GSTREAMER_SDK_ROOT
variable in Android.mk
file
I resolved "Unknown Application ABI" by doing 3 things:
Replaced
APP_ABI := all
by
ABI := armeabi
in Application.mk
Added
APP_PLATFORM := android-11
to Application.mk
Launched emulator before invoking Debug As | Android Native Application. Normally Eclipse shows "Android Device Chooser" if I invoke Debug As and no device is connected. Then I can launch emulator from there. But in the bad case this did not happen. I had to invoke Windows | Android Virtual Device Manager and make sure I have a valid emulator configured and launched. Then Debug As worked OK, showed "Android Device Chooser" and executed on the chosen device (either emulator or real one). This problem was not reproducible: once Eclipse began debugging on emulator, it did not show "Unknown Application ABI" again even after I closed emulator. Also note that I had a real device connected. It is possible that communication with real device broke somehow and that caused the error.
Check your Android.mk file. The problem can appear if you are printing some debug info from Android.mk like this
$(info YOU_MESSAGE)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With