使用Jetpack组件的Room时,遇到的一些问题以及解决方案

使用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.

使用Jetpack组件的Room时,遇到的一些问题以及解决方案如图设置一下就行