问题
I'm trying to develop android app, in gingerbread using OpenMAX-AL.
Basically openMAX-AL library not supporatable in GingerBread.So im using the openmax-al libray from ics (by building source).I able to compile my sample application using that library without error after installing in Ginger bread its showing error as below..And also i tried to push the library inside my application lib folder still same error.
What should i do to use openmax-al library in gingerbread. Can u any one suggest me idea ,im struggling for last one week? Thanks in advance.
used in Android.mk file to compile:
LOCAL_LDLIBS := $(LIB)/libOpenMAXAL.so
05-21 16:31:37.270: E/AndroidRuntime(28217): java.lang.ExceptionInInitializerError
05-21 16:31:37.270: E/AndroidRuntime(28217): at java.lang.Class.newInstanceImpl(Native Method)
05-21 16:31:37.270: E/AndroidRuntime(28217): at java.lang.Class.newInstance(Class.java:1409)
05-21 16:31:37.270: E/AndroidRuntime(28217): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
05-21 16:31:37.270: E/AndroidRuntime(28217): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1610)
05-21 16:31:37.270: E/AndroidRuntime(28217): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1716)
05-21 16:31:37.270: E/AndroidRuntime(28217): at android.app.ActivityThread.access$1500(ActivityThread.java:124)
05-21 16:31:37.270: E/AndroidRuntime(28217): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:968)
05-21 16:31:37.270: E/AndroidRuntime(28217): at android.os.Handler.dispatchMessage(Handler.java:99)
05-21 16:31:37.270: E/AndroidRuntime(28217): at android.os.Looper.loop(Looper.java:123)
05-21 16:31:37.270: E/AndroidRuntime(28217): at android.app.ActivityThread.main(ActivityThread.java:3806)
05-21 16:31:37.270: E/AndroidRuntime(28217): at java.lang.reflect.Method.invokeNative(Native Method)
05-21 16:31:37.270: E/AndroidRuntime(28217): at java.lang.reflect.Method.invoke(Method.java:507)
05-21 16:31:37.270: E/AndroidRuntime(28217): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-21 16:31:37.270: E/AndroidRuntime(28217): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-21 16:31:37.270: E/AndroidRuntime(28217): at dalvik.system.NativeStart.main(Native Method)
05-21 16:31:37.270: E/AndroidRuntime(28217): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1964]: 1240 could not load needed library 'libOpenMAXAL.so' for 'libnative-media-jni.so' (load_library[1106]: Library 'libOpenMAXAL.so' not found)
05-21 16:31:37.270: E/AndroidRuntime(28217): at java.lang.Runtime.loadLibrary(Runtime.java:434)
05-21 16:31:37.270: E/AndroidRuntime(28217): at java.lang.System.loadLibrary(System.java:554)
05-21 16:31:37.270: E/AndroidRuntime(28217): at com.example.nativemedia.NativeMedia.<clinit>(NativeMedia.java:338)
05-21 16:31:37.270: E/AndroidRuntime(28217): ... 15 more
regards VS
回答1:
During linking loader will only look for symbol references in dynamically linked libraries.
What you tried is may be copied OPENMAXAL.so
to the android-8/usr/lib
then compiled,, but when app runs, any library linked as below
LOCAL_LDLIBS += -lOpenMAXAL
should be in android's /system/libs/
.
As for GB, this will not be the case! Have you tried pushing the so to /system/lib/
?
来源:https://stackoverflow.com/questions/16668618/creating-android-app-using-openmax-library-in-gb-but-showing-not-found