Ich habe mehrere Abstürze aus Crashlytics: < /p>
java.lang.IllegalStateException - A migration from 8 to 10 was required but not found.
Please provide the necessary Migration path via RoomDatabase.Builder.addMigration(Migration ...)
< /code>
Ich verwende die FallbackTodestructivemigration von auf diese Weise: < /p>
fun buildDatabase(context: Context): OneDatabase {
// Since Room is only used for FTS, destructive migration is enough because the tables
// are cleared every time the app launches.
// https://medium.com/androiddevelopers/un ... 1e04b07929
return Room.databaseBuilder(context, OneDatabase::class.java, databaseName)
.fallbackToDestructiveMigrationFrom(1, 2, 3, 4, 5, 6, 7, 8)
.fallbackToDestructiveMigrationOnDowngrade()
.addMigrations(*allMigrations())
.build()
}
< /code>
Und der Allmigrations -Spaß ist: < /p>
fun allMigrations() = arrayOf(
MIGRATION_9_10, MIGRATION_10_11, MIGRATION_11_12
)
< /code>
reicht dies nicht aus, um FallbackTodestructivemigration aus (...) auszulösen, wenn eine Migration von 8 bis 10 erforderlich ist? Ich bin verloren.
			
			
			
			
						FallbackTodestructivemigration aus nicht genannt, weil "eine Migration von 8 bis 10 erforderlich war, aber nicht gefunde ⇐ Android
- 
				- Similar Topics
- Replies
- Views
- Last post
 
- 
				- 
												Migration von ASP.NET CORE 2.2 bis 3.1. Autofac.core.DependencyResolutionException
 by Anonymous » » in C#
- 0 Replies
- 27 Views
- 
						Last post by Anonymous															
									
								
														
 
 
- 
												
 Mobile version
 Mobile version