Android Room 数据库:添加依赖步骤
这两行代码需要添加到项目的'build.gradle'文件中。具体步骤如下:
-
打开项目中的'build.gradle'文件。
-
在'dependencies'块中添加以下两行代码:
implementation 'androidx.room:room-runtime:2.3.0'
annotationProcessor 'androidx.room:room-compiler:2.3.0'
- 保存并同步项目。
这样,你就成功添加了 Room 数据库的依赖。记得在添加完依赖后重新构建项目,以确保依赖正确加载。
原文地址: http://www.cveoy.top/t/topic/blco 著作权归作者所有。请勿转载和采集!