2

我将应用程序预装到 /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

我应该怎么办?

4

1 回答 1

0

尝试使用带有供应商库路径的 system.load 调用

于 2018-05-20T07:03:25.087 回答