我正在使用 Titanium 构建一个 Android 应用程序。我的 Android 模块com.tgl.androidmodule
包含一个名为libAlibrary-jni.so
.
在我的 .apk 中,本机库存在于其正确的文件夹(lib/armeabi、lib/armeabi-v7a、lib/x86)中,但在尝试动态加载库时仍然出现错误:System.loadLibrary("Alibrary-jni");
这是错误的完整堆栈跟踪:
11-12 08:46:00.654: D/dalvikvm(381): Trying to load lib /data/data/com.fw.test/lib/libstlport_shared.so 0x41e407e8
11-12 08:46:00.669: D/AndroidmoduleModule(381): (main) [18,433] inside onAppCreate
11-12 08:46:00.669: D/dalvikvm(381): Trying to load lib /data/data/com.fw.test/lib/libAlibrary-jni.so 0x41e407e8
11-12 08:46:00.719: D/dalvikvm(381): Added shared lib /data/data/com.fw.test/lib/libstlport_shared.so 0x41e407e8
11-12 08:46:00.719: D/dalvikvm(381): No JNI_OnLoad found in /data/data/com.fw.test/lib/libstlport_shared.so 0x41e407e8, skipping init
11-12 08:46:00.719: D/dalvikvm(381): Trying to load lib /data/data/com.fw.test/lib/libkroll-v8.so 0x41e407e8
11-12 08:46:00.879: D/dalvikvm(381): Added shared lib /data/data/com.fw.test/lib/libkroll-v8.so 0x41e407e8
11-12 08:46:01.039: D/dalvikvm(381): Added shared lib /data/data/com.fw.test/lib/libAlibrary-jni.so 0x41e407e8
11-12 08:46:01.054: D/dalvikvm(381): No JNI_OnLoad found in /data/data/com.fw.test/lib/libgeniusscanlibrary-jni.so 0x41e407e8, skipping init
11-12 08:46:01.959: E/TiApplication(381): (KrollRuntimeThread) [345,345] Sending event: exception on thread: KrollRuntimeThread msg:java.lang.UnsatisfiedLinkError: Couldn't load com.tgl.androidmodule: findLibrary returned null; Titanium 3.1.3,2013/09/18 12:01,222f4d1
11-12 08:46:01.959: E/TiApplication(381): java.lang.UnsatisfiedLinkError: Couldn't load com.tgl.androidmodule: findLibrary returned null
11-12 08:46:01.959: E/TiApplication(381): at java.lang.Runtime.loadLibrary(Runtime.java:365)
11-12 08:46:01.959: E/TiApplication(381): at java.lang.System.loadLibrary(System.java:535)
11-12 08:46:01.959: E/TiApplication(381): at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:114)
11-12 08:46:01.959: E/TiApplication(381): at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:81)
11-12 08:46:01.959: E/TiApplication(381): at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:175)
11-12 08:46:01.959: E/TiApplication(381): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:109)
有什么建议吗?