错误:找不到io.objectbox:objectbox-gradle-plugin:1.3.4

时间:2018-01-12 13:46:05

标签: android objectbox

请帮忙。我正在尽一切可能将objectbox集成到一个android项目中,并在每次尝试时都出错。我不确定是否是objectbox版本和android studio gradle版本之间的兼容性问题。我目前正在运行gradle 4.3.1并集成对象1.3.4。

project.build gradle文件

 // Top-level build file where you can add configuration options common to all sub-projects/modules.




 buildscript {
        //ext.objectboxVersion = '1.3.4'
        repositories {
            google()
            jcenter()
            maven {
                url "http://objectbox.net/beta-repo/"
            }

            dependencies {
                // need to include in top build file
                // https://developer.android.com/studio/build/gradle-plugin-3-0-0.html#known_issues
                classpath 'com.android.tools.build:gradle:3.0.1'
                classpath "io.objectbox:objectbox-gradle-plugin:1.4.0"
            }
        }

        allprojects {
            repositories {
                maven { url "http://objectbox.net/beta-repo/" }
                google()
                jcenter()
                mavenCentral()
            }
        }

        repositories {
            //maven { url "http://objectbox.net/beta-repo/" }
            jcenter()
            mavenCentral()
            google()
        }
    }

app.build gradle文件

apply plugin: 'com.android.application'


dependencies {
    debugCompile "io.objectbox:objectbox-android-objectbrowser:1.4.0"
    releaseCompile "io.objectbox:objectbox-android:1.4.0"
    compile 'io.objectbox:objectbox-java:1.4.0'
    annotationProcessor "io.objectbox:objectbox-processor:1.4.0"
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
apply plugin: 'io.objectbox'

android {
    compileSdkVersion 26
    buildToolsVersion "27.0.1"

    defaultConfig {
        applicationId "com.example.novo0007.objectbox"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

错误: click to see error image here

错误:找不到io.objectbox:objectbox-gradle-plugin:1.3.4。 要求:     项目:app 在build.gradle文件中搜索

0 个答案:

没有答案