WatermelonDB
WatermelonDB copied to clipboard
Issue using proguard and JSI on android
Hi, I've been fighting the "Uh-oh" error message that appears every time I turn on JSI.
After a load of debugging, I've found that everything works ok if I turn off enableProguardInReleaseBuilds
. Is this something anyone else has come across? Is there something I can add to proguard-rules.pro to be able to keep proguard on?
-keep class com.nozbe.watermelondb.** { *; }
Seems to work, is this a common issue? I can add it to the JSI installation steps
@selven yes, can you please add this to install docs? I may have forgotten about this
NB: Adding for google foo reasons
If you see this in your android logs
Error: Cannot run database method because database failed to open
and your app works fine in dev but breaks in productions (crashes on startup) and you have jsi + proguard this is likely your issue.
It's in installation docs + added more helpful error message here: https://github.com/Nozbe/WatermelonDB/pull/1522