0
  • 在build.gradle(非app)中添加这一行
    buildscript {
        repositories {
            google()
            mavenCentral()
            maven { url "https://jitpack.io" }//在build.gradle(非app)中添加这一行
        }
        dependencies {
            classpath "com.android.tools.build:gradle:7.0.2"
    
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    然后,在settings.gradle中添加这一行
    dependencyResolutionManagement {
        repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
        repositories {
            google()
            mavenCentral()
            maven { url "https://jitpack.io" }//添加这一行
        }
    }
    rootProject.name = "TaobaoUnion"
    include ':app'
    
    1435499052144893953  评论     打赏       安德鲁
    • 网络不行吧

      1139423796017500160  评论     打赏       断点-含光君
      • 同一个文件夹里有两个repositories,都 添加一下吧。

        1153952789488054272  评论     打赏       拉大锯
        • imageinee  回复 @拉大锯
          都加了呢
          imageinee 2020-08-18 19:08   回复 1295631441174061056
        • 拉大锯  回复 @imageinee
          要么你翻墙,要么你自己下载下来打包自己依赖吧,方法不唯一。
          拉大锯 2020-08-18 19:19   回复 1153952789488054272
        • imageinee  回复 @拉大锯
          好的,谢谢!
          imageinee 2020-08-18 20:33   回复 1295631441174061056
      • 两个repositories都加一下吧,再同步一下,看看能否下载下来。

        1153952789488054272  评论     打赏       拉大锯
        相关问题
        资质平平 · Android
        2025-02-20 09:14 96 100
        尖沙咀-段坤 · 项目
        2025-01-06 23:39 19 2
        雅澤yaduo · 领券联盟
        2025-01-03 20:39 55 50
        呆瓜小董 · webview
        2024-11-30 18:02 82 20
        阿肥 · 鸿蒙next
        2024-10-25 18:07 38 100
        尖沙咀-段坤 · 安卓
        2024-09-11 11:03 32 2
        YanLQ · AOSP
        2024-08-10 11:57 38 100
        断点 · vue
        2024-08-08 10:05 82 30
        幻影~ · 安卓 / 面试
        2024-06-15 18:51 48 2