错误:无法解析“:app @ developmentDebug / compileClasspath”的依赖项:无法解析项目

时间:2019-02-11 12:18:49

标签: android android-studio android-gradle build.gradle

我正在尝试将Quickblox项目添加为另一个项目中的模块。 Quickblox有两种不同的口味。当我将quickblox添加为模块时,出现以下错误-

ERROR: Unable to resolve dependency for ':app@developmentDebug/compileClasspath': Could not resolve project :quickblox.

这是我的QuickBlox Gradle

apply plugin: 'com.android.library'
android {
    compileSdkVersion 28
    defaultConfig {
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles fileTree(dir: "proguard", include: ["*.pro"]).asList().toArray()
            proguardFiles getDefaultProguardFile('proguard-android.txt')
        }
        debug {
            minifyEnabled false
            proguardFiles fileTree(dir: "proguard", include: ["*.pro"]).asList().toArray()
            proguardFiles getDefaultProguardFile('proguard-android.txt')
        }
    }
    flavorDimensions "default"
    defaultPublishConfig "doctorDebug"
    publishNonDefault true
    productFlavors {
        doctor {
            buildConfigField "boolean", "IS_DOCTOR", "true"
            versionNameSuffix "-doctor"
        }
        patient {
            buildConfigField "boolean", "IS_DOCTOR", "false"
            versionNameSuffix "-patient"
        }
    }
    android {
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation project(':library')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.quickblox:quickblox-android-sdk-videochat-webrtc:3.8.1'
    implementation 'com.facebook.fresco:fresco:1.8.1'
    api('com.quickblox:quickblox-android-sdk-messages:3.8.1')
}

我的主项目,我尝试将quickblox项目作为包含三种不同口味的模块。

apply plugin: 'com.android.application'

android {

    compileSdkVersion 28
    defaultConfig {
        applicationId "com.xxxxxx.xxxx"
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 171312
        versionName "1.2"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        project.archivesBaseName = "doctor"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles fileTree(dir: "proguard", include: ["*.pro"]).asList().toArray()
            proguardFiles getDefaultProguardFile('proguard-android.txt')
        }
        debug {
            minifyEnabled false
            proguardFiles fileTree(dir: "proguard", include: ["*.pro"]).asList().toArray()
            proguardFiles getDefaultProguardFile('proguard-android.txt')
        }
    }
    flavorDimensions "environment"
    productFlavors {
        staging {
            applicationIdSuffix ".staging"
        }
        production {
        }
        development {
            applicationIdSuffix ".development"
        }
    }
    dataBinding {
        enabled = true
    }
    buildToolsVersion '28.0.3'
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}
/*configurations {
    developmentDebugCompile
    developmentReleaseCompile
    stagingDebugCompile
    stagingReleaseCompile
    productionDebugCompile
    productionReleaseCompile
}*/
ext {
    retrofitVersion = '2.3.0'
    firebaseVersion = '15.0.2'
}
dependencies {
    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
    implementation "com.android.support:design:${rootProject.ext.supportLibVersion}"
    implementation "com.android.support:support-v13:$rootProject.ext.supportLibVersion"
    implementation "com.android.support:support-compat:${rootProject.ext.supportLibVersion}"
    implementation project(path: ':quickblox')

 /*   developmentDebugCompile project(path: ':quickblox', configuration: 'doctorDebug')
    developmentReleaseCompile project(path: ':quickblox', configuration: 'doctorDebug')
    stagingDebugCompile project(path: ':quickblox', configuration: 'doctorDebug')
    stagingReleaseCompile project(path: ':quickblox', configuration: 'doctorDebug')
    productionDebugCompile project(path: ':quickblox', configuration: 'doctorDebug')
    productionReleaseCompile project(path: ':quickblox', configuration: 'doctorDebug')*/
    // implementation project(path: ':quickblox')
}

Gradle版本是3.3.1。我已经尝试了stackoverflow中提到的其他答案,但是它不起作用。请帮忙。

0 个答案:

没有答案