【问题标题】:i try to do make project but its writes me this error [duplicate]我尝试做项目,但它给我写了这个错误[重复]
【发布时间】:2022-01-09 18:02:36
【问题描述】:

任务“:app:mergeDebugNativeLibs”执行失败。

无法解析配置“:app:debugRuntimeClasspath”的所有文件。 无法解析外部依赖 androidx.appcompat:appcompat:1.4.0,因为没有定义存储库。 要求: 项目:应用程序 无法解析外部依赖项 com.google.android.material:material:1.4.0,因为没有定义存储库。 要求: 项目:应用程序 无法解析外部依赖 androidx.constraintlayout:constraintlayout:2.1.2,因为没有定义存储库。 要求: 项目:应用程序

【问题讨论】:

    标签: java android android-studio gradle runtime-error


    【解决方案1】:

    在你的项目级别build.gradlerepositories中添加google()

    buildscript {
        repositories {
            google()
            mavenCentral()
    
        }
    }
    
    
    allprojects {
        repositories {
            google()
            mavenCentral()
        }
    }
    

    并确保从右侧的 Gradle 侧边栏菜单中未为 Gradle 开启离线模式

    【讨论】:

    • 我尝试过但不工作
    猜你喜欢
    • 2020-11-08
    • 1970-01-01
    • 2022-12-21
    • 1970-01-01
    • 1970-01-01
    • 2021-03-29
    • 1970-01-01
    • 2019-09-22
    • 1970-01-01
    相关资源
    最近更新 更多