【发布时间】:2016-02-09 16:16:33
【问题描述】:
我想使用no.nordicsemi.android.support.v18的scanner,但是当我构建项目时,出现了这样的错误:
Failed to resolve no.nordicsemi.android.support.v18:scanner
这是我在应用模块中的 build.gradle:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.support:wearable:1.3.0'
compile 'com.google.android.gms:play-services-wearable:7.8.0'
compile 'no.nordicsemi.android.support.v18:scanner:0.1.1'
compile project(':common')
}
还有我在项目中的 build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
我已经搜索了依赖项,发现它在 maven 存储库中,但我无法将其同步到本地,而像 com.google.android.support:wearable:1.3.0 这样的其他人做得很好,谁能告诉我为什么会发生这个错误以及我该如何解决这个问题,谢谢。
【问题讨论】:
-
你有代理吗?
-
是的,我正在使用代理。
-
你好像没有在AS配置中设置代理。
-
我已经在AS中启用了,其他依赖如support-v4可以正常同步。
-
支持库不在 jcenter 中。它们位于您机器上的本地 maven 上。
标签: java android maven android-studio gradle