我正在尝试在我的应用程序中使用Android IBeacon 库。我在我的 gradle 文件中添加了所有依赖项,并且 gradle 同步失败并出现以下错误:
Failed to refresh Gradle project 'IBeaconTest'
Could not find com.radiusnetworks:AndroidIBeaconLibrary:0.7.6.
Required by:
IBeaconTest:ibeacon:1.0
这是我的项目结构:
更新1:
模块的 build.gradle 文件(IbeaconTest/ibeacon/build.gradle):
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion '19.0.1'
defaultConfig {
minSdkVersion 18
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.radiusnetworks:AndroidIBeaconLibrary:0.7.6@aar'
compile fileTree(dir: 'libs', include: ['*.jar'])
}
主项目的build.gradle(IBeaconTest/build.gradle):
buildscript {
repositories {
mavenCentral()
flatDir {
dirs 'libs'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}