【发布时间】:2018-03-21 01:05:24
【问题描述】:
我在 Android Studio 3.0 中加载了一个项目。 Gradle 同步工作正常,项目构建。
当我将 implementation 'com.amazonaws.aws-android-sdk-mobile-client:2.6.+' 添加到我的 build.gradle (Module:app) 文件中时,就在已经属于这个优秀项目的所有其他依赖项旁边,gradle 无法找到该依赖项。许多现有的项目依赖项都在 com.amazonaws.aws-android-sdk-* 下,并且正在同步,例如implementation 'com.amazonaws:aws-android-sdk-core:2.6.+' 很好。
所以我仔细检查了新项目依赖项是否确实存在,浏览http://repo.maven.apache.org/maven2/com/amazonaws/aws-android-sdk-mobile-client 显示它存在,我没有看到拼写错误。
查看我的 build.gradle(项目:myProject),我看到以下内容
allprojects {
repositories {
mavenCentral()
google()
jcenter()
}
}
当 gradle 同步时我得到了
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.amazonaws.aws-android-sdk-mobile-client:2.6.+:.
Could not resolve com.amazonaws.aws-android-sdk-mobile-client:2.6.+:.
Required by:
project :app
No cached version of com.amazonaws.aws-android-sdk-mobile-client:2.6.+: available for offline mode.`
【问题讨论】:
标签: android-studio gradle android-gradle-plugin aws-mobilehub