在Android上使用最新版本的SQLCipher(3.5.7),从here克隆sqlcipher并构建so文件,现在在示例项目中使用libsqlcipher.so时获取java.lang.ClassNotFoundException 这是完整的堆栈跟踪:
05-11 10:53:30.384 22387-22403/? E/art: Thread attaching while runtime is shutting down: Binder_1
05-11 10:53:31.299 779-891/? E/native: do suspend false
05-11 10:53:31.351 2303-2307/? E/ANDR-PERF-LOCK: Failed to reset optimization for resource: 4 level: 0
05-11 10:53:31.423 1434-22289/? E/ctxmgr: [ProducerActiveIntervalImpl]addNewAppInterval: already contained:appKey=cdv@71c1b10a,appInterval=cdt@14cddfb,record=cjv{key=cjx{com.google.android.googlequicksearchbox, 10026, account#-248808883#, com.google.android.apps.gsa.staticplugins.proactive.GmsContextManagerClientHelper, 3708e5fc-2e68-458a-b194-60435c64681a}, t=1494477952131, name=1, lifetime=2, production=null, retention=null, dispatch=1, consumer=cfn@32dd3462-213796867}
05-11 10:53:31.639 1434-22290/? E/ctxmgr: [AppIntervalImpl]closeInterval: ongoing
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] JNI DETECTED ERROR IN APPLICATION: JNI FindClass called with pending exception java.lang.ClassNotFoundException: Didn't find class "net.sqlcipher.database.SQLiteDatabase" on path: DexPathList[[zip file "/data/app/x.xx.samplejni-1/base.apk"],nativeLibraryDirectories=[/data/app/x.xx.samplejni-1/lib/arm, /data/app/x.xx.samplejni-1/base.apk!/lib/armeabi, /vendor/lib, /system/lib]]
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:511)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:469)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.String) (Runtime.java:-2)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at java.lang.String java.lang.Runtime.doLoad(java.lang.String, java.lang.ClassLoader) (Runtime.java:435)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at void java.lang.Runtime.loadLibrary(java.lang.String, java.lang.ClassLoader) (Runtime.java:370)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at void java.lang.System.loadLibrary(java.lang.String) (System.java:1076)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at void x.xx.samplejni.MainActivity.<clinit>() (MainActivity.java:23)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at java.lang.Object java.lang.Class.newInstance!() (Class.java:-2)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1344)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at void android.os.Looper.loop() (Looper.java:148)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:5417)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:726)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:616)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410]
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] in call to FindClass
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] from java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.String)
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] "main" prio=5 tid=1 Runnable
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] | group="main" sCount=0 dsCount=0 obj=0x7318a2a0 self=0xb4db6500
05-11 10:53:32.028 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] | sysTid=22440 nice=0 cgrp=default sched=0/0 handle=0xb6faeb34
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] | state=R schedstat=( 53725266 34871818 121 ) utm=4 stm=1 core=1 HZ=100
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] | stack=0xbe0f5000-0xbe0f7000 stackSize=8MB
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] | held mutexes= "mutator lock"(shared held)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] native: #00 pc 00370e01 /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiPKcPNS_9ArtMethodEPv+160)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] native: #01 pc 0035046f /system/lib/libart.so (_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+150)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] native: #02 pc 0025a725 /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+740)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] native: #03 pc 0025adfd /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+64)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] native: #04 pc 000fd1d1 /system/lib/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+32)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] native: #05 pc 001022e5 /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE.constprop.95+5072)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] native: #06 pc 00104493 /system/lib/libart.so (_ZN3art8CheckJNI9FindClassEP7_JNIEnvPKc+386)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] native: #07 pc 000e4f97 /data/app/x.xx.samplejni-1/lib/arm/libsqlcipher.so (???)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] native: #08 pc 000e572b /data/app/x.xx.samplejni-1/lib/arm/libsqlcipher.so (???)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] native: #09 pc 0025b387 /system/lib/libart.so (_ZN3art9JavaVMExt17LoadNativeLibraryEP7_JNIEnvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEP8_jobjectPS9_+1238)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] native: #10 pc 002d13d7 /system/lib/libart.so (_ZN3artL18Runtime_nativeLoadEP7_JNIEnvP7_jclassP8_jstringP8_jobjectS5_+194)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] native: #11 pc 00212105 /data/dalvik-cache/arm/system@framework@boot.oat (Java_java_lang_Runtime_nativeLoad__Ljava_lang_String_2Ljava_lang_ClassLoader_2Ljava_lang_String_2+144)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at java.lang.Runtime.nativeLoad(Native method)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at java.lang.Runtime.doLoad(Runtime.java:435)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] - locked <0x0947938f> (a java.lang.Runtime)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at java.lang.Runtime.loadLibrary(Runtime.java:370)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at java.lang.System.loadLibrary(System.java:1076)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at x.xx.samplejni.MainActivity.<clinit>(MainActivity.java:23)
05-11 10:53:32.029 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at java.lang.Class.newInstance!(Native method)
05-11 10:53:32.031 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
05-11 10:53:32.031 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2317)
05-11 10:53:32.031 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
05-11 10:53:32.031 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at android.app.ActivityThread.-wrap11(ActivityThread.java:-1)
05-11 10:53:32.031 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
05-11 10:53:32.031 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at android.os.Handler.dispatchMessage(Handler.java:102)
05-11 10:53:32.031 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at android.os.Looper.loop(Looper.java:148)
05-11 10:53:32.031 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at android.app.ActivityThread.main(ActivityThread.java:5417)
05-11 10:53:32.031 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at java.lang.reflect.Method.invoke!(Native method)
05-11 10:53:32.031 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
05-11 10:53:32.031 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
05-11 10:53:32.031 22440-22440/x.xx.samplejni A/art: art/runtime/java_vm_ext.cc:410]
05-11 10:53:32.149 1923-2050/? E/BrcmNfcJni: nfaConnectionCallback: unknown event ????
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] Runtime aborting...
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] Aborting thread:
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] "main" prio=5 tid=1 Native
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] | group="" sCount=0 dsCount=0 obj=0x7318a2a0 self=0xb4db6500
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] | sysTid=22440 nice=0 cgrp=default sched=0/0 handle=0xb6faeb34
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] | state=R schedstat=( 70161467 49269159 286 ) utm=5 stm=2 core=1 HZ=100
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] | stack=0xbe0f5000-0xbe0f7000 stackSize=8MB
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] | held mutexes= "abort lock"
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #00 pc 00370e01 /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiPKcPNS_9ArtMethodEPv+160)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #01 pc 0035046f /system/lib/libart.so (_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+150)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #02 pc 00333827 /system/lib/libart.so (_ZNK3art10AbortState10DumpThreadERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPNS_6ThreadE+26)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #03 pc 00333abf /system/lib/libart.so (_ZN3art7Runtime5AbortEv+562)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #04 pc 000f45fb /system/lib/libart.so (_ZN3art10LogMessageD2Ev+2226)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #05 pc 0025aa4f /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+1550)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #06 pc 0025adfd /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+64)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #07 pc 000fd1d1 /system/lib/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+32)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #08 pc 001022e5 /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE.constprop.95+5072)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #09 pc 00104493 /system/lib/libart.so (_ZN3art8CheckJNI9FindClassEP7_JNIEnvPKc+386)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #10 pc 000e4f97 /data/app/x.xx.samplejni-1/lib/arm/libsqlcipher.so (???)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #11 pc 000e572b /data/app/x.xx.samplejni-1/lib/arm/libsqlcipher.so (???)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #12 pc 0025b387 /system/lib/libart.so (_ZN3art9JavaVMExt17LoadNativeLibraryEP7_JNIEnvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEP8_jobjectPS9_+1238)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #13 pc 002d13d7 /system/lib/libart.so (_ZN3artL18Runtime_nativeLoadEP7_JNIEnvP7_jclassP8_jstringP8_jobjectS5_+194)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #14 pc 00212105 /data/dalvik-cache/arm/system@framework@boot.oat (???)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.Runtime.nativeLoad(Native method)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.Runtime.doLoad(Runtime.java:435)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] - locked <0x0947938f> (a java.lang.Runtime)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.Runtime.loadLibrary(Runtime.java:370)
05-11 10:53:32.189 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.System.loadLibrary(System.java:1076)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at x.xx.samplejni.MainActivity.<clinit>(MainActivity.java:23)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.Class.newInstance!(Native method)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2317)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.app.ActivityThread.-wrap11(ActivityThread.java:-1)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.os.Handler.dispatchMessage(Handler.java:102)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.os.Looper.loop(Looper.java:148)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.app.ActivityThread.main(ActivityThread.java:5417)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.reflect.Method.invoke!(Native method)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] Pending exception java.lang.ClassNotFoundException: Didn't find class "net.sqlcipher.database.SQLiteDatabase" on path: DexPathList[[zip file "/data/app/x.xx.samplejni-1/base.apk"],nativeLibraryDirectories=[/data/app/x.xx.samplejni-1/lib/arm, /data/app/x.xx.samplejni-1/base.apk!/lib/armeabi, /vendor/lib, /system/lib]]
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:511)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:469)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.String) (Runtime.java:-2)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.String java.lang.Runtime.doLoad(java.lang.String, java.lang.ClassLoader) (Runtime.java:435)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at void java.lang.Runtime.loadLibrary(java.lang.String, java.lang.ClassLoader) (Runtime.java:370)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at void java.lang.System.loadLibrary(java.lang.String) (System.java:1076)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at void x.xx.samplejni.MainActivity.<clinit>() (MainActivity.java:23)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.Object java.lang.Class.newInstance!() (Class.java:-2)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.app.Activity android.app.Instrumentation.newActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent) (Instrumentation.java:1067)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2317)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2476)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:-1)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1344)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at void android.os.Looper.loop() (Looper.java:148)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:5417)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:726)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:616)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] Dumping all threads without appropriate locks held: thread list lock mutator lock
(_ZN3art9JavaVMExt17LoadNativeLibraryEP7_JNIEnvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEP8_jobjectPS9_+1238)
05-11 10:53:32.190 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #15 pc 002d13d7 /system/lib/libart.so (_ZN3artL18Runtime_nativeLoadEP7_JNIEnvP7_jclassP8_jstringP8_jobjectS5_+194)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] native: #16 pc 00212105 /data/dalvik-cache/arm/system@framework@boot.oat (Java_java_lang_Runtime_nativeLoad__Ljava_lang_String_2Ljava_lang_ClassLoader_2Ljava_lang_String_2+144)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.Runtime.nativeLoad(Native method)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.Runtime.doLoad(Runtime.java:435)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] - locked <0x0947938f> (a java.lang.Runtime)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.Runtime.loadLibrary(Runtime.java:370)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.System.loadLibrary(System.java:1076)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at x.xx.samplejni.MainActivity.<clinit>(MainActivity.java:23)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.Class.newInstance!(Native method)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2317)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.app.ActivityThread.-wrap11(ActivityThread.java:-1)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.os.Handler.dispatchMessage(Handler.java:102)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.os.Looper.loop(Looper.java:148)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at android.app.ActivityThread.main(ActivityThread.java:5417)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at java.lang.reflect.Method.invoke!(Native method)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
05-11 10:53:32.191 22440-22440/x.xx.samplejni A/art: art/runtime/runtime.cc:366]
--------- beginning of crash
05-11 10:53:32.193 22440-22440/x.xx.samplejni A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 22440 (xx.samplejni)
05-11 10:53:32.295 196-196/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-11 10:53:32.295 196-196/? A/DEBUG: Build fingerprint: 'google/hammerhead/hammerhead:6.0.1/MOB30Y/3067468:user/release-keys'
05-11 10:53:32.295 196-196/? A/DEBUG: Revision: '11'
05-11 10:53:32.295 196-196/? A/DEBUG: ABI: 'arm'
05-11 10:53:32.295 196-196/? A/DEBUG: pid: 22440, tid: 22440, name: xx.samplejni >>> x.xx.samplejni <<<
05-11 10:53:32.295 196-196/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
05-11 10:53:32.324 196-196/? A/DEBUG: Abort message: 'art/runtime/java_vm_ext.cc:410] JNI DETECTED ERROR IN APPLICATION: JNI FindClass called with pending exception java.lang.ClassNotFoundException: Didn't find class "net.sqlcipher.database.SQLiteDatabase" on path: DexPathList[[zip file "/data/app/x.xx.samplejni-1/base.apk"],nativeLibraryDirectories=[/data/app/x.xx.samplejni-1/lib/arm, /data/app/x.xx.samplejni-1/base.apk!/lib/armeabi, /vendor/lib, /system/lib]]'
05-11 10:53:32.325 196-196/? A/DEBUG: r0 00000000 r1 000057a8 r2 00000006 r3 b6faeb7c
(_ZN3art9JavaVMExt17LoadNativeLibraryEP7_JNIEnvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEP8_jobjectPS9_+1238)
05-11 10:53:32.359 196-196/? A/DEBUG: #15 pc 002d13d7 /system/lib/libart.so (_ZN3artL18Runtime_nativeLoadEP7_JNIEnvP7_jclassP8_jstringP8_jobjectS5_+194)
05-11 10:53:32.359 196-196/? A/DEBUG: #16 pc 71c76105 /data/dalvik-cache/arm/system@framework@boot.oat (offset 0x1ec9000)
05-11 10:53:32.691 196-196/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_06
05-11 10:53:32.691 196-196/? E/DEBUG: AM write failed: Broken pipe
的build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
minSdkVersion 14
targetSdkVersion 25
multiDexEnabled true
------
externalNativeBuild {
cmake {
cppFlags "-std=c++11"
arguments "-DANDROID_STL=c++_shared"
}
}
ndk {
abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'arm64-v8a'
cFlags += "SQLITE_HAS_CODEC"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
jniLibs.srcDirs = ['../app/dist/sqlcipher/lib']
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
}
dependencies {
-------
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
--------
compile 'com.android.support:multidex:1.0.1'
}