首页 > 解决方案 > 无法解析“:app@debug/compileClasspath”的依赖关系:无法解析com.github.rubensousa:bottomsheetbuilder:1.6.1

问题描述

我正在尝试安装以下依赖项:https ://github.com/rubensousa/BottomSheetBuilder

但它给了我以下错误:

在此处输入图像描述

我无法理解给我的错误可能是什么原因造成的。

这是我正在使用的 build.gradle 文件。

buildscript {
    repositories {
        jcenter()
        maven { url "https://maven.google.com" }
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.3'
    }
}

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.exoplayer"
        minSdkVersion 21
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

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

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    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.github.rubensousa:previewseekbar:2.0.0'
    implementation 'com.github.rubensousa:previewseekbar-exoplayer:2.8.1.0'
    implementation 'com.google.android.exoplayer:exoplayer:2.8.1'
    implementation 'com.github.bumptech.glide:glide:4.7.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
    implementation 'com.github.rubensousa:bottomsheetbuilder:1.6.1'
    implementation 'com.android.support:design:27.1.1'
}

我哪里错了?

标签: androidmanifest

解决方案


日志在测试包上显示错误。检查你的测试包,看看它们的类是否没有被删除。并且只是为了您自己的检查,注释测试依赖项并再次构建以查看错误是否仍然存在


推荐阅读