更新到Google Play Services 6.5.87后,由于缺少LocationCLient类,我的应用程序无法编译.
的文档链接 是在瞬间损坏(404未找到)
我该如何解决?我想收到位置更新,使用地理围栏等.
android location google-play-services android-geofence fusedlocationproviderapi
房间1.1.0版.
迁移后第一次运行时出现此错误.
如果我关闭应用程序并再次启动它,它运行良好.
ROOM: Cannot run invalidation tracker. Is the db closed?
java.lang.IllegalStateException: Cannot perform this operation because the connection pool has been closed.
at android.database.sqlite.SQLiteConnectionPool.throwIfClosedLocked(SQLiteConnectionPool.java:1182)
at android.database.sqlite.SQLiteConnectionPool.waitForConnection(SQLiteConnectionPool.java:792)
at android.database.sqlite.SQLiteConnectionPool.acquireConnection(SQLiteConnectionPool.java:518)
Caused By : SQL(query) error or missing database.
(no such table: room_table_modification_log (code 1): , while compiling: DELETE FROM proposals WHERE hotel_id = ?)
#################################################################
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1095)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:660)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:59)
at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.compileStatement(SQLiteDatabase.java:1417)
at android.arch.persistence.db.framework.FrameworkSQLiteDatabase.compileStatement(FrameworkSQLiteDatabase.java:64)
at android.arch.persistence.room.RoomDatabase.compileStatement(RoomDatabase.java:244)
at android.arch.persistence.room.SharedSQLiteStatement.createNewStatement(SharedSQLiteStatement.java:65)
at android.arch.persistence.room.SharedSQLiteStatement.getStmt(SharedSQLiteStatement.java:77)
at android.arch.persistence.room.SharedSQLiteStatement.acquire(SharedSQLiteStatement.java:87) …Run Code Online (Sandbox Code Playgroud) 以下代码仅在 observable2 完成后才从 observable1 发出项目。
observable1.startWith(observable2)
.subscribe()
Run Code Online (Sandbox Code Playgroud)
我需要实现另一种行为
observable1 -> 0 1 2 3
observable2 -> 1 2 3 4 5 6
observable1.startWithDefault(observable2)
-> 1 2 0 1 2 3
Run Code Online (Sandbox Code Playgroud)
第二个可观察对象仅在第一个可观察对象为空时发出项目,然后发出第一个可观察对象中的项目。
我无法仅使用基本运算符找到正确的解决方案,自定义运算符 startWithDefault 的正确 RxJava 2 实现应该是什么样子?
聚苯乙烯
observable1.subscribe()
observable2.takeUntil(observable1).subscribe()
Run Code Online (Sandbox Code Playgroud)
不是正确的解决方案,因为在 observable1 立即发出时存在竞争