2017-07-26 2 views
1

Ich beginne mit Raum Ausdauer zu arbeitenFehler beim Hinzufügen einer Bibliothek Zimmer Persistence

ich das Zimmer im gradle und den Fehler unten erschien hinzugefügt:

Error:Failed to resolve: annotationProcessor
href="openFile:C:/.../app/build.gradle">Open File

Dieser Fehler tritt auf, wenn ich die gradle synchronisieren

Wie kann ich dieses Problem beheben?

Dies ist das gradle Projekt:

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

buildscript { 
    repositories { 
     jcenter() 

    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.3.1' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

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

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

App gradle:

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.0" 
    dataBinding { 
     enabled = true 
    } 
    defaultConfig { 
     applicationId "com.app.bob.app" 
     minSdkVersion 22 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:25.3.0' 
    compile 'com.android.support:support-annotations:25.3.0' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    compile 'com.squareup.retrofit2:retrofit:2.3.0' 
    compile 'com.google.code.gson:gson:2.8.0' 
    compile 'com.squareup.retrofit2:converter-gson:2.3.0' 
    compile 'com.android.support:support-v4:25.3.0' 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:recyclerview-v7:25.3.0' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'com.jakewharton:butterknife:8.7.0' 
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0' 
    compile 'com.android.support:cardview-v7:25.3.0' 
    compile 'android.arch.persistence.room:runtime: 1.0.0-alpha5' 
    annotationProcessor 'android.arch.persistence.room:compiler: 1.0.0-alpha5' 
    compile 'android.arch.lifecycle:runtime:1.0.0-alpha5' 
    compile 'android.arch.lifecycle:extensions:1.0.0-alpha5' 
    annotationProcessor 'android.arch.lifecycle:compiler:1.0.0-alpha5' 
    testCompile 'android.arch.persistence.room:testing:1.0.0-alpha5' 
    compile 'android.arch.persistence.room:rxjava2:1.0.0-alpha5' 
} 

Antwort

1

Entfernen Sie alle Leerzeichen aus Ihren compile Werte. IOW, ersetzen:

compile 'android.arch.persistence.room:runtime: 1.0.0-alpha5' 
annotationProcessor 'android.arch.persistence.room:compiler: 1.0.0-alpha5' 

mit:

compile 'android.arch.persistence.room:runtime:1.0.0-alpha5' 
annotationProcessor 'android.arch.persistence.room:compiler:1.0.0-alpha5' 
Verwandte Themen