androidjava-native-interfaceproguardgreendaosqlcipher

App crashes on setting minifyEnabled to true


I am using greendao + sqlcipher and creating encrypted database using

helper.getEncryptedWritableDb("sdfbdfsjkdjkf");

I am also using proguard and have added rules

### greenDAO 3
-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
public static java.lang.String TABLENAME;
}
-keep class **$Properties

# If you do not use SQLCipher:
-dontwarn org.greenrobot.greendao.database.**
# If you do not use RxJava:
-dontwarn rx.**

### greenDAO 2
-keepclassmembers class * extends de.greenrobot.dao.AbstractDao {
public static java.lang.String TABLENAME;
}
-keep class **$Properties

#######################################################################

-keep public class net.sqlcipher.** {
    *;
}

-keep public class net.sqlcipher.database.** {
    *;
}

The moment i set minifyEnabled to true, my app crashes on starting after installation.

debug {
  shrinkResources false
  minifyEnabled false
  proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}

and it gives the following error on android monitor

03-02 17:20:27.262 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410] JNI DETECTED ERROR IN APPLICATION: JNI GetFieldID called with pending exception java.lang.NoSuchFieldError: no "J" field "nHandle" in class "Lnet/sqlcipher/database/SQLiteCompiledSql;" or its superclasses
03-02 17:20:27.262 29030-29030/com.abc.def.jkl 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)
03-02 17:20:27.262 29030-29030/com.abc.def.jkl 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)
03-02 17:20:27.262 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void java.lang.Runtime.loadLibrary(java.lang.String, java.lang.ClassLoader) (Runtime.java:370)
03-02 17:20:27.262 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void java.lang.System.loadLibrary(java.lang.String) (System.java:1076)
03-02 17:20:27.262 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void net.sqlcipher.database.SQLiteDatabase$1.loadLibraries(java.lang.String[]) ((null):-1)
03-02 17:20:27.262 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void net.sqlcipher.database.SQLiteDatabase.loadLibs(android.content.Context, java.io.File, net.sqlcipher.database.SQLiteDatabase$LibraryLoader) ((null):-1)
03-02 17:20:27.262 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void net.sqlcipher.database.SQLiteDatabase.loadLibs(android.content.Context, java.io.File) ((null):-1)
03-02 17:20:27.262 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void net.sqlcipher.database.SQLiteDatabase.loadLibs(android.content.Context) ((null):-1)
03-02 17:20:27.262 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void a.b.a.a.b$a.<init>(a.b.a.a.b, android.content.Context, java.lang.String, int, boolean) ((null):-1)
03-02 17:20:27.262 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at a.b.a.a.b$a a.b.a.a.b.a() ((null):-1)
03-02 17:20:27.262 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at a.b.a.a.a a.b.a.a.b.a(java.lang.String) ((null):-1)
03-02 17:20:27.262 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at com.abc.def.jkl.db.b com.abc.def.jkl.j.a(android.content.Context) ((null):-1)
03-02 17:20:27.262 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void com.abc.def.jkl.SplashScreen.onCreate(android.os.Bundle) ((null):-1)
03-02 17:20:27.262 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6259)
03-02 17:20:27.262 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1130)
03-02 17:20:27.262 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2379)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2490)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:-1)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1354)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void android.os.Looper.loop() (Looper.java:148)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:5443)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl 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)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:728)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:618)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410] 
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]     in call to GetFieldID
03-02 17:20:27.263 29030-29030/com.abc.def.jkl 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)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410] "main" prio=5 tid=1 Runnable
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   | group="main" sCount=0 dsCount=0 obj=0x7402d2a0 self=0xb83c9d80
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   | sysTid=29030 nice=0 cgrp=default sched=0/0 handle=0xb6f6cb34
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   | state=R schedstat=( 140388802 17542708 90 ) utm=9 stm=5 core=0 HZ=100
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   | stack=0xbe3fa000-0xbe3fc000 stackSize=8MB
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   | held mutexes= "mutator lock"(shared held)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   native: #00 pc 0035ca0d  /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiPKcPNS_9ArtMethodEPv+116)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   native: #01 pc 0033d863  /system/lib/libart.so (_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+138)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   native: #02 pc 0024f719  /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+760)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   native: #03 pc 0024fdb7  /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+54)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   native: #04 pc 000fc0b3  /system/lib/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+30)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   native: #05 pc 00100f8f  /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE.constprop.95+5054)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   native: #06 pc 001081bd  /system/lib/libart.so (_ZN3art8CheckJNI10GetFieldIDEP7_JNIEnvP7_jclassPKcS6_+388)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   native: #07 pc 000ab9d9  /data/app/com.abc.def.jkl-2/lib/arm/libsqlcipher.so (_ZN9sqlcipher43register_android_database_SQLiteCompiledSqlEP7_JNIEnv+64)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   native: #08 pc 000abbfd  /data/app/com.abc.def.jkl-2/lib/arm/libsqlcipher.so (JNI_OnLoad+32)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   native: #09 pc 002502e3  /system/lib/libart.so (_ZN3art9JavaVMExt17LoadNativeLibraryEP7_JNIEnvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEP8_jobjectPS9_+1174)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   native: #10 pc 002c240f  /system/lib/libart.so (_ZN3artL18Runtime_nativeLoadEP7_JNIEnvP7_jclassP8_jstringP8_jobjectS5_+178)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   native: #11 pc 0021bb8d  /system/framework/arm/boot.oat (Java_java_lang_Runtime_nativeLoad__Ljava_lang_String_2Ljava_lang_ClassLoader_2Ljava_lang_String_2+144)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at java.lang.Runtime.nativeLoad(Native method)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at java.lang.Runtime.doLoad(Runtime.java:435)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   - locked <0x042a7377> (a java.lang.Runtime)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at java.lang.Runtime.loadLibrary(Runtime.java:370)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at java.lang.System.loadLibrary(System.java:1076)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at net.sqlcipher.database.SQLiteDatabase$1.loadLibraries(unavailable:-1)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at net.sqlcipher.database.SQLiteDatabase.loadLibs(unavailable:-1)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   - locked <0x0a4b9be4> (a java.lang.Class<net.sqlcipher.database.SQLiteDatabase>)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at net.sqlcipher.database.SQLiteDatabase.loadLibs(unavailable:-1)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   - locked <0x0a4b9be4> (a java.lang.Class<net.sqlcipher.database.SQLiteDatabase>)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at net.sqlcipher.database.SQLiteDatabase.loadLibs(unavailable:-1)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   - locked <0x0a4b9be4> (a java.lang.Class<net.sqlcipher.database.SQLiteDatabase>)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at a.b.a.a.b$a.<init>(unavailable:-1)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at a.b.a.a.b.a(unavailable:-1)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at a.b.a.a.b.a(unavailable:-1)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at com.abc.def.jkl.j.a(unavailable:-1)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at com.abc.def.jkl.SplashScreen.onCreate(unavailable:-1)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at android.app.Activity.performCreate(Activity.java:6259)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at android.app.ActivityThread.-wrap11(ActivityThread.java:-1)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at android.os.Handler.dispatchMessage(Handler.java:102)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at android.os.Looper.loop(Looper.java:148)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at android.app.ActivityThread.main(ActivityThread.java:5443)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at java.lang.reflect.Method.invoke!(Native method)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410]   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
03-02 17:20:27.263 29030-29030/com.abc.def.jkl A/art: art/runtime/java_vm_ext.cc:410] 
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399] Runtime aborting...
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399] Aborting thread:
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399] "main" prio=5 tid=1 Native
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   | group="" sCount=0 dsCount=0 obj=0x7402d2a0 self=0xb83c9d80
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   | sysTid=29030 nice=0 cgrp=default sched=0/0 handle=0xb6f6cb34
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   | state=R schedstat=( 170290990 17596041 92 ) utm=11 stm=6 core=0 HZ=100
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   | stack=0xbe3fa000-0xbe3fc000 stackSize=8MB
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   | held mutexes= "abort lock"
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   native: #00 pc 0035ca0d  /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiPKcPNS_9ArtMethodEPv+116)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   native: #01 pc 0033d863  /system/lib/libart.so (_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+138)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   native: #02 pc 00321955  /system/lib/libart.so (_ZNK3art10AbortState10DumpThreadERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEPNS_6ThreadE+20)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   native: #03 pc 00321bc9  /system/lib/libart.so (_ZN3art7Runtime5AbortEv+532)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   native: #04 pc 000f3d0d  /system/lib/libart.so (_ZN3art10LogMessageD2Ev+2212)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   native: #05 pc 0024fa15  /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+1524)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   native: #06 pc 0024fdb7  /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+54)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   native: #07 pc 000fc0b3  /system/lib/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+30)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   native: #08 pc 00100f8f  /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE.constprop.95+5054)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   native: #09 pc 001081bd  /system/lib/libart.so (_ZN3art8CheckJNI10GetFieldIDEP7_JNIEnvP7_jclassPKcS6_+388)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   native: #10 pc 000ab9d9  /data/app/com.abc.def.jkl-2/lib/arm/libsqlcipher.so (_ZN9sqlcipher43register_android_database_SQLiteCompiledSqlEP7_JNIEnv+64)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   native: #11 pc 000abbfd  /data/app/com.abc.def.jkl-2/lib/arm/libsqlcipher.so (JNI_OnLoad+32)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   native: #12 pc 002502e3  /system/lib/libart.so (_ZN3art9JavaVMExt17LoadNativeLibraryEP7_JNIEnvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEP8_jobjectPS9_+1174)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   native: #13 pc 002c240f  /system/lib/libart.so (_ZN3artL18Runtime_nativeLoadEP7_JNIEnvP7_jclassP8_jstringP8_jobjectS5_+178)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   native: #14 pc 0021bb8d  /system/framework/arm/boot.oat (???)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at java.lang.Runtime.nativeLoad(Native method)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at java.lang.Runtime.doLoad(Runtime.java:435)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   - locked <0x042a7377> (a java.lang.Runtime)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at java.lang.Runtime.loadLibrary(Runtime.java:370)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at java.lang.System.loadLibrary(System.java:1076)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at net.sqlcipher.database.SQLiteDatabase$1.loadLibraries(unavailable:-1)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at net.sqlcipher.database.SQLiteDatabase.loadLibs(unavailable:-1)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   - locked <0x0a4b9be4> (a java.lang.Class<net.sqlcipher.database.SQLiteDatabase>)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at net.sqlcipher.database.SQLiteDatabase.loadLibs(unavailable:-1)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   - locked <0x0a4b9be4> (a java.lang.Class<net.sqlcipher.database.SQLiteDatabase>)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at net.sqlcipher.database.SQLiteDatabase.loadLibs(unavailable:-1)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   - locked <0x0a4b9be4> (a java.lang.Class<net.sqlcipher.database.SQLiteDatabase>)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at a.b.a.a.b$a.<init>(unavailable:-1)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at a.b.a.a.b.a(unavailable:-1)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at a.b.a.a.b.a(unavailable:-1)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at com.abc.def.jkl.j.a(unavailable:-1)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at com.abc.def.jkl.SplashScreen.onCreate(unavailable:-1)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at android.app.Activity.performCreate(Activity.java:6259)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at android.app.ActivityThread.-wrap11(ActivityThread.java:-1)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at android.os.Handler.dispatchMessage(Handler.java:102)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at android.os.Looper.loop(Looper.java:148)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at android.app.ActivityThread.main(ActivityThread.java:5443)
03-02 17:20:27.412 29030-29030/com.abc.def.jkl A/art: art/runtime/runtime.cc:399]   at java.lang.reflect.Method.invoke!(Native method)

The app works fine if i set minifyEnabled to false.What should i do to prevent this..i want to obfuscate the code?


Solution

  • Since you are facing java.lang.NoSuchFieldError then you should exclude SqlCipher's stuff from being affected by ProGuard actions. You do that by adding the following entry to your proguard-rules.pro (or whatever is your proguard config file named):

    -keep class net.sqlcipher.** {
        *;
    }