1

在我的项目中,我想使用 DBFlow 库作为数据库 ORM,在 Gradle 中添加库并同步后,我收到此错误:

Error:Could not find com.github.Raizlabs.DBFlow:dbflow-core:4.0.0-beta7.
Required by:
    MyApp:app:unspecified
    Search in build.gradle files

我正在通过库文档安装这个库

def dbflow_version = "4.0.0-beta7"

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')

    compile "com.android.support:support-v13:${support_library}"
    compile "com.android.support:recyclerview-v7:${support_library}"
    compile "com.android.support:design:${support_library}"

    annotationProcessor "com.github.Raizlabs.DBFlow:dbflow-processor:${dbflow_version}"
    compile "com.github.Raizlabs.DBFlow:dbflow-core:${dbflow_version}"
    compile "com.github.Raizlabs.DBFlow:dbflow:${dbflow_version}"
    compile "com.github.Raizlabs.DBFlow:dbflow-sqlcipher:${dbflow_version}"
    // RXJava 2 support
    compile "com.github.Raizlabs.DBFlow:dbflow-rx2:${dbflow_version}"
    ...
}

我清理并重建项目并再次同步,但这个问题没有解决

4

1 回答 1

1

你加了这个

allprojects {
repositories {
    jcenter()
    maven { url "https://www.jitpack.io" }
}}

在另一个 gradle 文件中?

于 2017-05-11T07:25:07.520 回答