android-studio - 在最后一个 gradle 版本中无法解析 android studio 中的 jitpack 依赖项
问题描述
我得到Failed to resolve: com.github.dogecoin:libdohj:v0.15.9
错误,我不知道为什么。我还尝试了其他 jitpack 依赖项。它在我以前的项目中运行良好。
buildscript {
ext {
compose_version = '1.0.2'
}
repositories {
google()
maven { url "https://jitpack.io" }
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
classpath "com.google.dagger:hilt-android-gradle-plugin:2.38.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
解决方案
我将其添加maven { url "https://jitpack.io" }
到 settings.gradle 并解决了问题。
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
maven { url "https://jitpack.io" }
}
}
rootProject.name = "Crypto World"
include ':app'
推荐阅读
- vba - 合并工作簿中的工作表 - 字符限制
- c# - 选择查询 C# 中出现“System.Data.OleDb.OleDbException”类型的未处理异常
- java - 单击按钮后如何将值传递给JPanel类?
- javascript - 我可以进一步提高 Rails 应用程序的加载性能吗
- php - Codeigniter 获取数据
- google-chrome - 是否可以创建一个可以设置我的计算机网络设置的 Google Chrome 扩展程序?
- node.js - Couchbase NodeJs SDK bucket.insert 不返回值
- php - mysqli多次插入未提交数组中的所有行
- assembly - 减少程序集中的 rcx 产生 0x00007fff988c63c7 而不是 x86 程序集中的 1?
- google-api - 您是否需要“释放()”“queryChildren()”的结果?