Java 无法解析no.nordicsemi.android.support.v18:scanner
我想使用Java 无法解析no.nordicsemi.android.support.v18:scanner,java,android,maven,android-studio,gradle,Java,Android,Maven,Android Studio,Gradle,我想使用no.nordicsemi.android.support.v18的扫描器,但是当我构建项目时,出现了这样的错误: Failed to resolve no.nordicsemi.android.support.v18:scanner 这是我的build.gradle应用程序模块: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.google.android.su
no.nordicsemi.android.support.v18
的扫描器,但是当我构建项目时,出现了这样的错误:
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')
}
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()
}
}
以及项目中我的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')
}
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 repository中找到了它,但我无法将它同步到本地,而其他人如
com.google.android.support:wearable:1.3.0
做得很好,谁能告诉我为什么会发生此错误以及我如何解决此问题,谢谢。你的应用程序版本可能低于18。Android Scanner Compat Library(no.nordicsemi.Android.support.v18:Scanner:0.1.1')的SDK最低版本为18,因此您只能在Minsdk版本为18+的项目上使用它。您有代理吗?是的,我正在使用代理。您似乎没有在AS配置中设置代理。我已在AS中启用了它,其他依赖项(如support-v4)可以正常同步。支持库不在jcenter中。他们在你机器上的本地maven上。谢谢你的回答,但我已经澄清了minSdkVersion=18。