清单文件
<!-- Required to provide the web interface -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Required to run keep-alive service when targeting API 28 or higher -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
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
网友评论