无法从android 4.0.3中的/ vendor / lib加载lib

时间:2013-03-14 06:31:19

标签: android loadlibrary vendor

我将app预安装到/ vendor / app,将lib预安装到/ vendor / lib。当我启动应用程序时,异常捕获:

> E/AndroidRuntime( 2446):        at
> android.app.Activity.performCreate(Activity.java:4465)
> E/AndroidRuntime( 2446):        at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
> E/AndroidRuntime( 2446):        at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
> E/AndroidRuntime( 2446):        at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
> E/AndroidRuntime( 2446):        at
> android.app.ActivityThread.access$600(ActivityThread.java:123)
> E/AndroidRuntime( 2446):        at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
> E/AndroidRuntime( 2446):        at
> android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(
> 2446):        at android.os.Looper.loop(Looper.java:137)
> E/AndroidRuntime( 2446):        at
> android.app.ActivityThread.main(ActivityThread.java:4424)
> E/AndroidRuntime( 2446):        at
> java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(
> 2446):        at java.lang.reflect.Method.invoke(Method.java:511)
> E/AndroidRuntime( 2446):        at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
> E/AndroidRuntime( 2446):        at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
> E/AndroidRuntime( 2446):        at
> dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 2446):
> Caused by: java.lang.UnsatisfiedLinkError: Couldn't load
> jni_factory_test: findLibrary returned null E/AndroidRuntime( 2446):  
> at java.lang.Runtime.loadLibrary(Runtime.java:365) E/AndroidRuntime(
> 2446):        at java.lang.System.loadLibrary(System.java:535)

我的环境是:

export LD_LIBRARY_PATH /vendor/lib:/system/lib

我该怎么办?

1 个答案:

答案 0 :(得分:0)

尝试使用带有lib lib的路径的system.load调用