android - android中的房间数据库无法解析 'android.arch.persistence.room:runtime:1.0.0'

标签 android gradle android-gradle-plugin android-room

我想使用 Room DB,但是当我添加依赖项时,gradle 出现错误。

Failed to resolve 'android.arch.persistence.room:runtime:1.0.0'

我有错误的图像:

enter image description here

最佳答案

在项目 build.gradle 文件中添加以下代码。

allprojects {
    repositories {
        jcenter()
        maven { url 'https://maven.google.com' }
    }
}

关于android - android中的房间数据库无法解析 'android.arch.persistence.room:runtime:1.0.0',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47921898/

相关文章:

Android:维护全局应用程序状态

gradle - Gradle def与外部

运行多个任务的 Gradle 自定义任务

android-gradle-plugin - 对于 AAR,上传到 bintray 静默失败

java - 如何在 androidTest 运行时发送模拟位置坐标?

java - 无法解析 Symbol Theme、Themeoverlay 和 widget Appcompat

java - 出现错误 java.lang.RuntimeException : Unable to start activity ComponentInfo

Android - 使用 SYSTEM_OVERLAY 改变触摸事件

java - 应用小部件更新服务有时会强制关闭 - 需要帮助!

angular - 从IntelliJ运行Angular项目时看不到任何更改(html,css)