簡體   English   中英

如何修復Android Studio中的循環依賴錯誤

[英]How do I fix this circular dependency error in android studio

Circular dependency between the following tasks:
:app:checkManifestChangesRelease
\--- :app:instantRunMainApkResourcesRelease
     \--- :app:transformClassesAndDexWithShrinkResForRelease
          \--- :app:transformDexArchiveWithDexMergerForRelease
               +--- :app:preColdswapRelease
               |    \--- :app:incrementalReleaseTasks
               |         +--- :app:transformClassesAndClassesEnhancedWithInstantReloadDexForRelease
               |         |    \--- :app:transformClassesWithInstantRunForRelease
               |         |         \--- :app:checkManifestChangesRelease (*)
               |         \--- :app:transformClassesWithInstantRunForRelease (*)
               \--- :app:transformClassesWithDexBuilderForRelease
                    +--- :app:preColdswapRelease (*)
                    \--- :app:transformClassesWithInstantRunForRelease (*)

(*) - details omitted (listed previously)

這是我的build.gradle文件。

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

allprojects {
    repositories {
        google()
        jcenter()

        maven { url "https://jitpack.io" }
    }
}


buildscript {
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:4.0.0'
    }
}


android {

    signingConfigs {
        config {
            keyAlias 'key1'
            keyPassword 'galimane'
            storeFile file('/home/natesh/Documents/android_movie_go_key_store/movie_go_key.jks')
            storePassword 'galimane'
        }
    }
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.techy.nateshmbhat.moviego"
        minSdkVersion 22
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            debuggable true
            signingConfig signingConfigs.config
        }
        debug {
            signingConfig signingConfigs.config
        }
    }
}

dependencies {
    implementation 'com.google.firebase:firebase-core:16.0.0'
    implementation 'com.google.firebase:firebase-messaging:17.0.0'
    implementation 'com.google.firebase:firebase-database:16.0.1'
    implementation 'com.android.volley:volley:1.1.0'
    implementation 'com.google.code.gson:gson:2.8.+'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'info.movito:themoviedbapi:1.7'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
    implementation 'com.android.support:design:28.0.0-alpha3'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation 'com.android.support:support-v13:28.0.0-alpha3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.android.support:gridlayout-v7:28.0.0-alpha3'
}

我遇到了同樣的問題,禁用Instant Run對我有用。 Preferences -> Build, Execution, Deployment -> Instant Run並將其禁用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM