使用Jetpack組件的Room時,遇到的一些問題以及解決方案

一.Cannot find getter for field 

我定義的變量爲:private String mWord;但是get方法是這樣的:getmWord()

解決方法就是改成getMWord

二.警告: 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.

如圖設置一下就行

 

 

 

 

 

 

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