Posted onEdited onWord count in article: 1.7kReading time ≈2 mins.
objectbox
手动添加依赖库
如果 ObjectBox 插件没有自动添加依赖库和注解处理器,那么手动添加。
1 2 3 4 5
dependencies { // all below should be added automatically by the plugin compile "io.objectbox:objectbox-android:$objectboxVersion" annotationProcessor "io.objectbox:objectbox-processor:$objectboxVersion" }
1 2 3 4 5 6 7
dependencies { // all below should be added automatically by the plugin compile "io.objectbox:objectbox-android:$objectboxVersion" kapt "io.objectbox:objectbox-processor:$objectboxVersion" // some useful Kotlin extension functions compile "io.objectbox:objectbox-kotlin:$objectboxVersion" }
改变 model 文件位置
默认 model 文件位于 module-name/objectbox-models/default.json.