.so集成/在Android中使用单独的项目作为库

时间:2017-03-30 03:57:06

标签: android

我在原生JNI文件的帮助下创建了一个键盘库,它在单独运行时工作正常,但是当我在另一个项目中将它用作liabrary时,则会抛出错误

03-30 09:23:02.411 21738-21738/com.mezanger.mezanger E/JniUtils: Could not load native library jni_latinime
                                                                 java.lang.UnsatisfiedLinkError: dlopen failed: library "/system/lib64/libjni_latinime.so" needed or dlopened by "/system/lib64/libnativeloader.so" is not accessible for the namespace "classloader-namespace"
                                                                     at java.lang.Runtime.loadLibrary0(Runtime.java:989)
                                                                     at java.lang.System.loadLibrary(System.java:1530)
                                                                     at com.android.inputmethod.latin.utils.JniUtils.<clinit>(JniUtils.java:29)
                                                                     at com.android.inputmethod.latin.utils.JniUtils.loadNativeLibrary(JniUtils.java:0)
                                                                     at org.smc.inputmethod.indic.LatinIME.<clinit>(LatinIME.java:518)
                                                                     at java.lang.Class.newInstance(Native Method)
                                                                     at android.app.ActivityThread.handleCreateService(ActivityThread.java:3173)
                                                                     at android.app.ActivityThread.-wrap5(ActivityThread.java)
                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)
                                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                     at android.os.Looper.loop(Looper.java:154)
                                                                     at android.app.ActivityThread.main(ActivityThread.java:6126)
                                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
03-30 09:23:02.976 21738-21803/com.mezanger.mezanger E/art: No implementation found for long com.android.inputmethod.latin.BinaryDictionary.createOnMemoryNative(long, java.lang.String, java.lang.String[], java.lang.String[]) (tried Java_com_android_inputmethod_latin_BinaryDictionary_createOnMemoryNative and Java_com_android_inputmethod_latin_BinaryDictionary_createOnMemoryNative__JLjava_lang_String_2_3Ljava_lang_String_2_3Ljava_lang_String_2)

请任何人知道而不是帮助。

0 个答案:

没有答案