tags:

views:

24

answers:

1

I have a problem when compiling JNI. It returns the error message like that "arm-eabi/bin/ld: cannot find -landroid_runtime". I think libandroid_runtime.so is the android's own lib. Why ld can't find the lib. Can somebody help me. My develop environment as follow: OS: Ubuntu 9.10 SDK: Android2.2 NDK: r4b

A: 

libandroid_runtime.so is in fact one of the Android system libraries, and as such is not available for NDK apps.

Check the file docs/STABLE-APIS.txt for a list of supported libraries, or even better, check the folder build/platforms/android-#/arch-arm/usr/lib where # is the Android platform level, for the definitive list of libraries you can link against.

As they say on the NDK lists, even if you manage to link against one of the other Android libraries, it likely won't work on some (or possibly even most) phones, even if it works on the one you're testing.

SomeCallMeTim