开发者

android ndk: cannot find android_runtime

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 devel开发者_如何学编程op environment as follow: OS: Ubuntu 9.10 SDK: Android2.2 NDK: r4b


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.


To solve your problem build a emulation of every android possible and recompile a version for each android and put it on the market with specific compatibility.

EDIT: Try using: adb pull /system/lib
EDIT 2: There also should be a egl folder in /lib so you know to look for it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜