I'm using SQLCIPHER to read or write database getting error
@CommonsWare is correct and you down-voted it.
When your app is being resumed from a long sleep, the libs have been cycled out and thus restoring state is crashing because libs are absent.
Put your SQLiteDatabase.loadLibs(this); ahead of super.onCreate(savedInstanceState)
@Overridepublic void onCreate(Bundle savedInstanceState) { //you must set Context on SQLiteDatabase first SQLiteDatabase.loadLibs(this); super.onCreate(savedInstanceState);