Код: Выделить всё
val newDBVersion = SettingsManager.loadReticlesNewDBversion()
val currentDBVersion = SettingsManager.loadReticlesDBversion()
if (newDBVersion != currentDBVersion ){
val res = context.getDatabasePath("ReticleDataBase").delete()
SettingsManager.saveREticlesDBVersion(newDBVersion)
}
return if (database == null){
database = Room.databaseBuilder(context, PreloadedReticlesDataBase::class.java, "ReticleDataBase").createFromAsset("AmmoDataBase.db").build()
database as PreloadedReticlesDataBase
}else{
database as PreloadedReticlesDataBase
}
Код: Выделить всё
[SELECT * from ReticleDataBase ORDER BY name] database disk image is malformed
2025-12-17 11:39:58.810 32450-1953 SupportSQLite com.ballistic.calculator.strelok E Corruption reported by sqlite on database: androidx.sqlite.db.framework.FrameworkSQLiteDatabase@72271f0.path
Подробнее здесь: https://stackoverflow.com/questions/798 ... image-is-m
Мобильная версия