【发布时间】:2016-02-06 18:21:46
【问题描述】:
我知道这已经有多个线程,但没有一个修复有效,所以我认为我一定有一个独特的问题,或者犯了一个聪明的人可以指出的愚蠢错误。
我正在尝试使用 Realm Recyclerview(可在此处找到:https://github.com/thorbenprimke/realm-recyclerview)
但是我无法让 gradle 同步超出错误 29,13 无法解决 com.github.thorbenprimke:realmr-ecyclerview:0.9.12
我的应用 build.gradle 文件如下所示:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.harris.school"
minSdkVersion 18
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile files('libs/joda-time-2.9.jar')
compile 'com.android.support:cardview-v7:23.1.1'
compile 'io.realm:realm-android:0.84.1'
compile 'com.github.thorbenprimke:realm-recyclerview:0.9.12'
}
另一个看起来像这样:
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
谢谢!
【问题讨论】:
-
请您发布您的完整堆栈跟踪。使用 --stacktrace 运行 gradle 命令
-
构建文件看起来不错。您是否尝试过从命令行运行
./gradlew clean assemble --refresh-dependencies?
标签: android gradle android-gradle-plugin android-recyclerview realm