gradle - 找不到 com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0
问题描述
我已经从 Mapbox 创建了所需的帐户和密钥。我以不同的顺序列出了存储库,但没有运气。编译时出现如下错误:
无法解析配置“:app:debugRuntimeClasspath”的所有文件。
找不到 com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0。在以下位置搜索: - https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/mapbox-android-accounts-0.7.0.pom - https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/mapbox-android-accounts-0.7.0.pom 要求:项目:app > com .mapbox.mapboxsdk:mapbox-android-sdk:9.2.1
这是我的 build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.5.20"
repositories {
google()
mavenCentral()
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
// Do not change the username below.
// This should always be `mapbox` (not your username).
username = 'mapbox'
// Use the secret token you stored in gradle.properties
password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
}
}
}
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
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我已将以下内容添加到我的模块级 build.gradle 实现中'com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.1'
解决方案
我只添加了jcenter()
它,它可以工作。但是,jcenter()
已弃用。
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
推荐阅读
- python - 使用花式索引修改空间矩阵
- powerbi - DAX Power BI - Show latest record according to date filter
- c# - 如何在 C# 控制台应用程序中捕获雪花数据库中的日期时间戳?
- python - 如何在python中添加两个dicts的对应元素?
- python - 使用 python 和 lambda 函数进行柯里化
- javascript - VTK.js - 从自定义源创建网格
- react-bootstrap - 将 Accordion (1.6.1 & 2.0.0-Alpha) 分解为 2 个组件 - 所有手风琴项目都打开
- node.js - 运行我用 Angular js 编写的代码并收到一条我无法解决的错误消息
- r - 更改闪亮 DT 表中的迷你图颜色
- c# - 从另一个 ViewModel 更改属性时视图不更新