android Google Room數據庫問題總結

def room_version = "1.1.1-rc1"
    implementation "android.arch.persistence.room:runtime:$room_version"
    implementation "android.arch.persistence.room:rxjava2:$room_version"
    annotationProcessor "android.arch.persistence.room:1.0.0"
cannot find implementation for com.im.room.AppDatabase. AppDatabase_Impl does not exist
build配置文件中添加
annotationProcessor "androidx.room:room-compiler:$room_version"
警告: Schema export directory is not provided to the annotation processor so we cannot export the schema. You can either provide `room.schemaLocation` annotation processor argument OR set exportSchema to false.
public abstract class AppDatabase extends RoomDatabase {

https://blog.csdn.net/hexingen/article/details/78725958

錯誤: Entities and POJOs must have a usable public constructor. You can have an empty constructor or a constructor whose parameters match the fields (by name and type). - java.util.List

https://blog.csdn.net/I13kmsteady/article/details/88218416 Android Room 之存儲 Objects 中的 List
https://blog.csdn.net/weixin_34309543/article/details/87350723 Android room 存儲複雜數據類型
https://stackoverflow.com/questions/53085704/room-typeconverter Room TypeConverter

數據模糊查找

@Query("SELECT * FROM hamster WHERE name LIKE '%' || :nickName || '%'")
List<User>  loadUsers(String nickName);

https://www.jianshu.com/p/61e7a92d3ba1
https://www.e-learn.cn/content/wangluowenzhang/191617
https://blog.csdn.net/t000818/article/details/84258618
https://www.jianshu.com/p/3e358eb9ac43

Room數據庫

https://blog.csdn.net/cankingapp/article/details/78773838

https://blog.csdn.net/cankingapp/article/details/78773838 Lifecycle+Retrofit+Room完美結合 領略架構之美 GreenDao ORMLite Room性能對比

https://developer.android.google.cn/jetpack/androidx/releases/lifecycle Lifecycle官網
https://developer.android.google.cn/topic/libraries/architecture/adding-components.html#room 官方文檔 Adding Components to your Project
https://developer.android.google.cn/jetpack/androidx/releases/room room 官網
https://developer.android.google.cn/training/data-storage/room/
https://blog.csdn.net/u011897062/article/details/82107709 Android Room 官方指南
https://www.jianshu.com/p/f4923374885b Android—Room數據庫多表查詢(Relationships)
https://www.jianshu.com/p/cfde3535233d Android—Room數據庫(介紹)

https://blog.csdn.net/jiankeufo/article/details/79693956 Room VS GreenDao
https://www.jianshu.com/p/7354d5048597 Android Room使用

https://www.cnblogs.com/littlepanpc/p/9269549.html 使用Room將數據保存在本地數據庫 嵌套 關係
https://my.oschina.net/u/219974/blog/2877228 Android 數據存儲 Room
https://www.jianshu.com/p/3e358eb9ac43 Android Room 框架學習
https://blog.csdn.net/benzhujie1245com/article/details/87392959 Android Room 使用指南
https://www.jianshu.com/p/61e7a92d3ba1 關於Room數據庫,拼寫模糊查找的語句遇到問題
https://developer.android.google.cn/training/data-storage/room/
https://www.jianshu.com/p/09ac09cecfff Android Jetpack架構篇:帶視圖的Android Room Repository
更新於2.19年7月11日 7:58 工藝美
https://blog.csdn.net/u011686167/article/details/82826364 帶大家熟悉Android全新的Room數據庫框架

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章