浏览器访问ObjectBox 数据库

清单文件





root build.gradle

buildscript {
    ext.objectboxVersion = '2.5.1' 
    dependencies { 
        classpath "io.objectbox:objectbox-gradle-plugin:$objectboxVersion" 
    }
} 

app build.gradle

dependencies {
    //支持浏览器查看数据库数据,如果不需要可以去掉dependencies 代码块
    debugImplementation "io.objectbox:objectbox-android-objectbrowser:$objectboxVersion"
    releaseImplementation "io.objectbox:objectbox-android:$objectboxVersion" 
}
//一定放在dependencies代码块下
apply plugin: 'io.objectbox'// after applying Android plugin 

命令行输入:adb -s 192.168.2.186 forward tcp:8090 tcp:8090

浏览器访问
http://localhost:8090/index.html

你可能感兴趣的:(浏览器访问ObjectBox 数据库)