java - 错误 : Failed to resolve: com. android.support :mediarouter-v7:23. 4.0

标签 java android compiler-errors

我正在尝试编译一个开源项目(从github下载)

build.gradle (Module app) image

我还附上了我的SDK 管理器图片

SDK Manager image

我在谷歌上搜索了很多这个问题,但由于(我)新的 android bee 我无法正确理解问题和这些问题的解决方案。我安装 API 级别 23 作为解决方案,但没有任何收获。如有任何帮助,我们将予以适当处理,提前致谢。

Android工作室信息:

Android Studio 3.4.1 内部版本 #AI-183.6156.11.34.5522156,建于 2019 年 5 月 2 日 JRE:1.8.0_152-release-1343-b01 amd64 JVM:JetBrains s.r.o 的 OpenJDK 64 位服务器 VM Windows 10 10.0

************ 我的 build.gradle(项目:XXX)

enter image description here

最佳答案

请尝试将 google() 添加到 build.gradle(Project:xxx)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        google() // ---------------------------------(here)
        jcenter()

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

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
} 

allprojects {
    repositories {
        google()  //-----------------------------(here)
        jcenter()
        maven {
                 url 'https://maven.google.com'
             }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

关于java - 错误 : Failed to resolve: com. android.support :mediarouter-v7:23. 4.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61324569/

相关文章:

java - 为什么 PoolingHttpClientConnectionManager 提供越来越慢的连接?

java - 更新到 api 19 后 Google Maps V2 崩溃

android - Libgdx 是否适用于 virtualbox 和 android x86?

android - 堆栈中的多个 MapActivity

android - 迁移到 Google Play 服务后,广告系列跟踪不起作用

typescript - 如何禁用TSLint警告-深度导入

ios - 当我创建 NSManagedObject 的子类时,我得到 'failed code with exit 1'

java - 将 BottomView 添加到 GridView Android

compiler-errors - 德尔福 XE 2010 : Access Violation - How to remove package or component?

java - 如何在面板上使用 addActionListener