8

I meet an error when I use gradle classpath 'com.android.tools.build:gradle:3.0.0-alpha1' like this:

 Error:Circular dependency between the following tasks:
:app:compileDebugKotlin
+--- :app:dataBindingExportBuildInfoDebug
|    \--- :app:compileDebugKotlin (*)
\--- :app:kaptDebugKotlin
     \--- :app:dataBindingExportBuildInfoDebug (*)
(*) - details omitted (listed previously)

this is my project build.gradle:

buildscript {
    ext.kotlin_version = '1.1.2-4'
    ext.support_version = "25.3.1"
    ext.butterknife_version = "8.4.0"
    ext.anko_version = "0.9"
    ext.bugly_upgrade= "1.2.4"

repositories {
    mavenCentral()
    jcenter()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0-alpha1'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
    allprojects {
        repositories {
            jcenter()
            mavenCentral()
            maven { url "https://jitpack.io" }
            maven {
                url 'https://oss.sonatype.org/content/repositories/snapshots/'
            }
        }
    
    }

my module build.gradle is here:

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

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.3'
    defaultConfig {
        applicationId "com.guuguo.android.pikacomic"
        minSdkVersion 17
        targetSdkVersion 25
        versionCode 7
        versionName "0.5"
        ndk {
            //设置支持的SO库架构
            abiFilters /*'armeabi',*/ 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
        }
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
        renderscriptTargetApi 20
        renderscriptSupportModeEnabled true

    }
    signingConfigs {
        release {
            keyAlias 'SOMETHING'
            keyPassword 'SOMETHING'
            storeFile file('mimi.jks')
            storePassword 'SOMETHING'
        }
        debug {
            keyAlias 'SOMETHING'
            keyPassword 'SOMETHING'
            storeFile file('mimi.jks')
            storePassword 'SOMETHING'
        }
    }
    buildTypes {
        release {
            debuggable false
            jniDebuggable false
            zipAlignEnabled true
            shrinkResources false
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        }
        debug {
            debuggable true
            jniDebuggable true
            zipAlignEnabled true
            shrinkResources false
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        }
    }
    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }
    dataBinding {
        enabled = true
    }
}
kapt {
    generateStubs = true
}

dependencies {
    compile project(':androidLib:androidLib')
    compile project(':library')
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'

    compile 'com.android.support:multidex:1.0.1'
    /*support*/
    compile "com.android.support:cardview-v7:$support_version"
    /* Kotlin */
    compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    kapt "com.android.databinding:compiler:2.5.0-alpha-preview-02"
    /* RxJava2 */
    compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
    compile 'io.reactivex.rxjava2:rxjava:2.1.0'
    /* Retrofit */
    compile 'com.squareup.retrofit2:converter-gson:2.3.0'
    compile 'com.squareup.retrofit2:retrofit:2.3.0'
    compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'

    /*view*/
    compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
    compile 'com.flyco.banner:FlycoBanner_Lib:2.0.2@aar'
    compile ('com.alibaba.android:vlayout:1.0.6@aar') {
        transitive = true
    }

    /*function*/
    compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.12'
    compile 'com.github.bumptech.glide:glide:3.8.0'
    compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'

}

thanks very much!

JJD
  • 50,076
  • 60
  • 203
  • 339
guo deqing
  • 77
  • 2
  • https://stackoverflow.com/questions/44035504/how-to-use-data-binding-and-kotlin-in-android-studio-3-0-0 – Kendroid May 24 '17 at 07:19

0 Answers0