SQLite insertion exception when android code is ofuscated with Proguard

1k views Asked by At

I am obfuscating the source code of my full operating app with proguard. But after activating proguard I am having this problem:

06-16 18:52:17.779  10971-11059/? E/SQLiteLog﹕ (1299) abort at 10 in [INSERT INTO wifi_venues(name,wifi_password,wifi_ssid,id) VALUES (?,?,?,?)]: NOT NULL constraint failed: wifi_venues.name
06-16 18:52:17.779  10971-11059/? E/SQLiteDatabase﹕ Error inserting name=null wifi_password=null wifi_ssid=null id=0
    android.database.sqlite.SQLiteConstraintException: NOT NULL constraint failed: wifi_venues.name (code 1299)
            at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
            at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:782)
            at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
            at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
            at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1471)
            at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1341)
            at com.wiffinity.easyaccess.repository.venuesrepo.wifivenues.RepositoryWiFiVenuesImpl.a(SourceFile:181)
            at com.wiffinity.easyaccess.repository.venuesrepo.wifivenues.RepositoryWiFiVenuesImpl.a(SourceFile:43)
            at cmg.run(SourceFile:121)
            at java.lang.Thread.run(Thread.java:818)

I thought I was a problem with SQLite obfuscation so I added to proguard-rules.txt this:

-keep class com.db.models.**
-keepclassmembers class com.db.models.** { *; }
-keep public class android.database.sqlite.**

But it still happening. Is proguard obfuscating the values too? What do I need to solve this?

0

There are 0 answers