美文网首页
Not sure how to convert a Cursor

Not sure how to convert a Cursor

作者: 九风特 | 来源:发表于2021-07-14 16:48 被阅读0次

今天写一个room接口,简单的一B,但死活报这个错误,我改成各种返回值都报这个错,
最后发现是函数前边多加了一个“suspend",去掉就好了,但是错误报的奇怪的一B
气人,再此记录下,避免好人遇到这个问题挠头

@Query("SELECT * FROM localSettings")
suspend fun getLocalSettings():Flow<List<LocalSettings>>

改成

@Query("SELECT * FROM localSettings")
fun getLocalSettings():Flow<List<LocalSettings>>

相关文章

网友评论

      本文标题:Not sure how to convert a Cursor

      本文链接:https://www.haomeiwen.com/subject/nziypltx.html