首页 > 解决方案 > 添加库时出错 https://github.com/Romancha/android-material-play-pause-view-button

问题描述

无法解析 ':app@debugUnitTest/compileClasspath' 的依赖关系:无法解析 com.github.romancha:MaterialPlayPauseViewButton:1.0.1。显示详细信息 受影响的模块:app

无法解析 ':app@debugAndroidTest/compileClasspath' 的依赖关系:无法解析 com.github.romancha:MaterialPlayPauseViewButton:1.0.1。显示详细信息 受影响的模块:app

无法解析 ':app@debug/compileClasspath' 的依赖关系:无法解析 com.github.romancha:MaterialPlayPauseViewButton:1.0.1。显示详细信息 受影响的模块:app

repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
        maven { url 'https://maven.google.com' }
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.2.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:4.3.8'
        classpath 'com.novoda:bintray-release:0.8.1'
    }

我尝试过无效的缓存/重启,也尝试过离线工具甚至重启项目。但显示同样的错误。

我有两个相同的依赖项

//PlayButton
    implementation 'com.github.romancha:MaterialPlayPauseViewButton:1.0.1'
    implementation 'com.github.Romancha:android-material-play-pause-view-button:-SNAPSHOT'

我已经交替使用了这两种方法,但同样有错误。我从(https://jitpack.io/#Romancha/android-material-play-pause-view-button/-SNAPSHOT)获取的快照依赖关系。

标签: androidandroid-studiokotlingithubgradle

解决方案


推荐阅读