我正在为数据库安全开发SQLite加密扩展演示。 从“sqlite.org”下载演示但我无法下载libsqlite.so文件。
提前致谢。
修改
错误给我这条线 的System.loadLibrary( “sqliteX”);
我的Logcat给我这个错误
12-05 12:17:09.008 509-509/org.sqlite.app.customsqlite E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.sqlite.app.customsqlite, PID: 509
java.lang.IllegalStateException: Could not execute method of the activity
at android.view.View$1.onClick(View.java:3846)
at android.view.View.performClick(View.java:4478)
at android.view.View$PerformClick.run(View.java:18698)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at android.view.View$1.onClick(View.java:3841)
at android.view.View.performClick(View.java:4478)
at android.view.View$PerformClick.run(View.java:18698)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load sqliteX from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.sqlite.app.customsqlite-1.apk"],nativeLibraryDirectories=[/data/app-lib/org.sqlite.app.customsqlite-1, /vendor/lib, /system/lib, /system/lib/arm]]]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:358)
at java.lang.System.loadLibrary(System.java:526)
at org.sqlite.app.customsqlite.CustomSqlite.run_the_tests(CustomSqlite.java:388)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at android.view.View$1.onClick(View.java:3841)
at android.view.View.performClick(View.java:4478)
at android.view.View$PerformClick.run(View.java:18698)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515
答案 0 :(得分:0)
如果您不想自己构建libsqlite,则可以使用使用Android备份的库。
您可以在/system/lib/libsqlite.so
中的Android 5.1.1模拟器中找到它,并且可以使用
adb pull /system/lib/libsqlite.so