2017-05-28 26 views
7

Bu, yeni Oda android mimarisi kitaplığı eklendiğinden bu yana olmaya başladı. Ben şüpheli diğer hatalar nedeniyle uğradılarGörevler arasındaki çakışma bağımlılığı

: Ben olarak ek açıklamalarına kapt ekleyerek sabit AppDatabase_Impl exsisting değil ile sorunları vardı AS, Kotlin ve Java 8, bu yüzden AS 3.0

güncelleştirmeyi denedim şu anda oluşturmaya çalışırken aşağıdaki hatayı alıyorum:

Information:Gradle tasks [:app:generateDebugSources,  :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:compileDebugSources, :app:compileDebugAndroidTestSources, :app:compileDebugUnitTestSources, :cryptocurrency-icons:generateDebugSources, :cryptocurrency-icons:mockableAndroidJar, :cryptocurrency-icons:generateDebugAndroidTestSources, :cryptocurrency-icons:compileDebugSources, :cryptocurrency-icons:compileDebugUnitTestSources, :cryptocurrency-icons:compileDebugAndroidTestSources] 
Error:Circular dependency between the following tasks: 
:app:compileDebugKotlin 
+--- :app:dataBindingExportBuildInfoDebug 
| \--- :app:compileDebugKotlin (*) 
\--- :app:kaptDebugKotlin 
    \--- :app:dataBindingExportBuildInfoDebug (*) 
(*) - details omitted (listed previously) 
Information:BUILD FAILED in 1s 
Information:1 error 
Information:0 warnings 
Information:See complete output in console 

Benim gradle dosyaları gibi görünür: gradle

Proje gradle

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

buildscript { 
    repositories { 
     jcenter() 
    } 

    ext { 
     compileSdkVersion = 25 
     buildToolsVersion = "25.0.3" 
     minSdkVersion = 16 
     targetSdkVersion = 25 
     kotlin_version = '1.1.2-4' 
     gradle_version = '2.3.2' 
     android_arch_room_version = '1.0.0-alpha1' 
    } 

    dependencies { 
     classpath 'com.android.tools.build:gradle:3.0.0-alpha2' 
     classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 

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

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

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

Modül gradle

apply plugin: 'com.android.library' 

android { 
    compileSdkVersion rootProject.ext.compileSdkVersion 
    buildToolsVersion rootProject.ext.buildToolsVersion 

    defaultConfig { 
     minSdkVersion rootProject.minSdkVersion 
     targetSdkVersion rootProject.targetSdkVersion 
     consumerProguardFiles 'consumer-proguard-rules.pro' 
     versionCode 100 
     versionName "1.0.0" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile 'com.mikepenz:iconics-core:[email protected]' 
} 

App

apply plugin: 'com.android.application' 
apply plugin: 'kotlin-android' 
apply plugin: 'kotlin-kapt' 

kapt { 
    generateStubs = true 
} 

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

dependencies { 
    //Jars 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    //Modules 
    compile project(':cryptocurrency-icons') 
    //Kotlin 
    compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" 
    //Support 
    compile 'com.android.support:appcompat-v7:25.3.1' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    compile 'com.android.support:design:25.3.1' 
    compile 'com.android.support:support-v4:25.3.1' 
    //OSS 
    compile 'com.squareup.retrofit2:retrofit:2.3.0' 
    compile 'com.squareup.retrofit2:converter-scalars:2.3.0' 
    compile 'com.github.daniel-stoneuk:material-about-library:1.9.0' 
    compile 'com.mikepenz:iconics-core:[email protected]' 
    compile 'com.mikepenz:community-material-typeface:[email protected]' 
    compile 'com.github.paolorotolo:appintro:4.1.0' 
    compile 'com.journeyapps:zxing-android-embedded:3.5.0' 
    //Data binding 
    kapt "com.android.databinding:compiler:$gradle_version" 
    //Room 
    compile "android.arch.persistence.room:runtime:$android_arch_room_version" 
    kapt "android.arch.persistence.room:compiler:$android_arch_room_version" 
    //Test 
    testCompile 'junit:junit:4.12' 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
} 
repositories { 
    mavenCentral() 
} 
+0

Projenizi veya optimum bir MCVE'u GitHub veya benzerleri aracılığıyla sağlayabilir misiniz? – Vampire

+0

https://github.com/RichyHBM/circular-dependency-mcve Bu bağımlılık olarak eklenen sadece Databinding ve Oda kütüphaneleri ile yeni bir android projesidir. – RichyHBM

+0

Üzgünüm, Android SDK'miz yok, fakat belki başka biri MCVE ile kullanılabilir bir şey söyle. – Vampire

cevap

-1

kaldır hat benim durumda kaldırma hatası

apply plugin: 'kotlin-kapt' 

sonra

1

this bakmak Lütfen çizginin üstünde kaldırın. o Kotlin Gradle eklentisi 1.1.2-4

0

uygulamak eklenti bir hata gibi görünüyor: // 'com.android.library'

bu

olduğunu deneyin kullanımdan kaldırıldı eklenti uygulamak 'com.android.feature'

: '-KOTLIN android'

eklentisi uygulamakEklentiyi uygula: 'kotlin-android-extensions'