错误:无法解析':app @ playDebug / compileClasspath'的依赖项:无法解析项目

时间:2018-01-10 21:15:03

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

我有这个问题,我该如何解决这些错误?

   - Error:Unable to resolve dependency for ':app@playDebug/compileClasspath': Could not resolve project :pray-times.

Unable to resolve dependency for ':app@playDebug/compileClasspath': Could not resolve project :pray-times.

Could not resolve project :pray-times.
Required by:
    project :app
 > Unable to find a matching configuration of project :pray-times: None of the consumable configurations have attributes

   - Error:Unable to resolve dependency for ':app@playDebugAndroidTest/compileClasspath': Could not resolve project :pray-times.
Unable to resolve dependency for ':app@playDebugAndroidTest/compileClasspath': Could not resolve project :pray-times.

Could not resolve project :pray-times.
Required by:
    project :app
 > Unable to find a matching configuration of project :pray-times: None of the consumable configurations have attributes

   - Error:Unable to resolve dependency for ':app@playDebugUnitTest/compileClasspath': Could not resolve project :pray-times.
Unable to resolve dependency for ':app@playDebugUnitTest/compileClasspath': Could not resolve project :pray-times.

Could not resolve project :pray-times.
Required by:
    project :app
 > Unable to find a matching configuration of project :pray-times: None of the consumable configurations have attributes.

   - Error:Unable to resolve dependency for ':app@playRelease/compileClasspath': Could not resolve project :pray-times.
Unable to resolve dependency for ':app@playRelease/compileClasspath': Could not resolve project :pray-times.

Could not resolve project :pray-times.
Required by:
    project :app
 > Unable to find a matching configuration of project :pray-times: None of the consumable configurations have attributes.

   - Error:Unable to resolve dependency for ':app@playReleaseUnitTest/compileClasspath': Could not resolve project :pray-times.
Unable to resolve dependency for ':app@playReleaseUnitTest/compileClasspath': Could not resolve project :pray-times.

Could not resolve project :pray-times.
Required by:
    project :app
 > Unable to find a matching configuration of project :pray-times: None of the consumable configurations have attributes.

   - Error:Unable to resolve dependency for ':app@fdroidDebug/compileClasspath': Could not resolve project :pray-times.
Unable to resolve dependency for ':app@fdroidDebug/compileClasspath': Could not resolve project :pray-times.

Could not resolve project :pray-times.
Required by:
    project :app
 > Unable to find a matching configuration of project :pray-times: None of the consumable configurations have attributes.

   - Error:Unable to resolve dependency for ':app@fdroidDebug/compileClasspath': Could not resolve project :pray-times.
Unable to resolve dependency for ':app@fdroidDebugAndroidTest/compileClasspath': Could not resolve project :pray-times.

Could not resolve project :pray-times.
Required by:
    project :app
 > Unable to find a matching configuration of project :pray-times: None of the consumable configurations have attributes.

   - Error:Unable to resolve dependency for ':app@fdroidDebugAndroidTest/compileClasspath': Could not resolve project :pray-times.
Unable to resolve dependency for ':app@fdroidDebugUnitTest/compileClasspath': Could not resolve project :pray-times.

Could not resolve project :pray-times.
Required by:
    project :app
 > Unable to find a matching configuration of project :pray-times: None of the consumable configurations have attributes.

   - Error:Unable to resolve dependency for ':app@fdroidRelease/compileClasspath': Could not resolve project :pray-times.
Unable to resolve dependency for ':app@fdroidRelease/compileClasspath': Could not resolve project :pray-times.

Could not resolve project :pray-times.
Required by:
    project :app
 > Unable to find a matching configuration of project :pray-times: None of the consumable configurations have attributes.

   - Error:Unable to resolve dependency for ':app@fdroidReleaseUnitTest/compileClasspath': Could not resolve project :pray-times.
Unable to resolve dependency for ':app@fdroidReleaseUnitTest/compileClasspath': Could not resolve project :pray-times.

Could not resolve project :pray-times.
Required by:
    project :app
 > Unable to find a matching configuration of project :pray-times: None of the consumable configurations have attributes.

这是我的build.gradle

buildscript {

    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        //noinspection GradleDynamicVersion
        classpath 'io.fabric.tools:gradle:+'
    }

    }


    apply plugin: 'com.android.application'
    apply plugin: 'io.fabric'

    android {
    sourceSets {
        main.assets.srcDirs += ['../changelogs']
    }

    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude '.readme'
    }

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }

    compileSdkVersion 26
    buildToolsVersion '26.0.2'

    defaultConfig {
        applicationId "com.metinkale.prayer"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 191
        versionName '3.6.6'
        multiDexEnabled false
        vectorDrawables.useSupportLibrary = true
    }

    dexOptions {
        javaMaxHeapSize "2g"
        preDexLibraries = false
    }

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

    flavorDimensions "store"
    productFlavors {
        fdroid {
            versionName = android.defaultConfig.versionName + " F-Droid"
            dimension "store"
        }
        play {
            versionName = android.defaultConfig.versionName + " Play Store"
            repositories {
                maven { url 'https://maven.fabric.io/public' }
            }
            dimension "store"
        }
    }

    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_7
        sourceCompatibility JavaVersion.VERSION_1_7
    }

    testOptions {
        unitTests.returnDefaultValues = true
    }
    }

一切都是最新的。

    dependencies {
    playCompile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
        transitive = true
    }
    //excludeInFDroid
    fdroidCompile('com.mapbox.mapboxsdk:mapbox-android-sdk:4.1.1@aar') {
        transitive = true
    }
    compile('com.mikepenz:aboutlibraries:5.8.5@aar') {
        transitive = true
    }

此申请是针对穆斯林的。

    compile project(':pray-times') 
    compile 'joda-time:joda-time:2.9.6:no-tzdb'
    compile 'com.google.code.gson:gson:2.8.2'
    compile 'com.android.support:percent:26.1.0'
    compile 'com.android.support:recyclerview-v7:26.1.0'
    compile 'com.android.support:appcompat-v7:26.1.0'
    compile 'com.android.support:customtabs:26.1.0'
    compile 'com.android.support:design:26.1.0'
    compile 'com.android.support:cardview-v7:26.1.0'
    compile 'com.android.support:preference-v14:26.1.0'
    compile 'com.koushikdutta.ion:ion:2.1.9'
    compile 'net.steamcrafted:materialiconlib:1.1.4'
    compile 'com.evernote:android-job:1.1.11'
    compile 'com.github.anrwatchdog:anrwatchdog:1.3.0'
    debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
    playCompile 'com.google.android.gms:play-services-maps:11.8.0' 
    playCompile 'com.google.android.gms:play-services-gcm:11.8.0' 
    playCompile 'com.google.android.gms:play-services-location:11.8.0' 
    releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'us.feras.mdv:markdownview:1.1.0'

    }

我认为问题来自这里

这是“classpath”:

    buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'

我更新到最新版本。

0 个答案:

没有答案