2016-09-21 2 views
0

내가 내 build.gradle (모듈 : 응용 프로그램)에Gradle을은 recycleview-v7.jar을 찾을 수 couldnt는하지만

compile 'com.android.support:recyclerview-v7:24.1.1' 
compile 'io.realm:android-adapters:1.3.0' 

이 recycleview 나는 이미 가지고있는 파일입니다. 내가 gradle 파일을 동기화하면 recyclerview-v7.jar(com.android.support:recyclerview-v7: 24.1.1)을 찾을 수 없다고합니다. 그것이 지금 올바르게 구축되지 않는 이유는, 내가 이미 recyclerview-v7 jar 파일을 성공적으로 빌드했음을 의미합니다 (나는 이미 Android 어댑터없이 사용했습니다). 이 오류없이 안드로이드 어댑터를 어떻게 구축 할 수 있습니까?

// Project level build.gradle file 
buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.1.3' 
     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
     classpath "io.realm:realm-gradle-plugin:1.2.0" 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

// App level build.gradle file 
apply plugin: 'com.android.application' 
apply plugin: 'realm-android' 

android { 
    compileSdkVersion 24 
    buildToolsVersion "24.0.1" 

    defaultConfig { 
     applicationId "com.beacon.retailersgear" 
     minSdkVersion 11 
     targetSdkVersion 24 
     versionCode 1 
     versionName "1.0" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 

    compile 'com.android.support:appcompat-v7:24.1.1' 
    compile 'com.android.support:design:24.1.1' 



    // RecyclerView and CardView 
    compile 'com.android.support:recyclerview-v7:24.1.1' 
    compile 'com.android.support:cardview-v7:24.1.1' 

    compile 'io.realm:android-adapters:1.3.0' 

} 
+0

당신은 전체 Gradle을 파일을 게시 할 수 있습니까? 거기에 compileTree (*. jar)도 있습니까? –

+0

이전 버전과 동일한 버전 24.1.1을 사용합니까? 그렇지 않으면 어쩌면 당신은 "안드로이드 저장소"와 "구글 저장소"의 업데이 트가 없어. – Dara

+0

예 이전 버전과 동일한 버전을 사용하고 있습니다. – arcode

답변

0

realm:android-adapterscompile 'com.android.support:recyclerview-v7:23.3.0' 가져올 것 같다, 그래서 당신은 그것을 제외해야합니다.

compile('io.realm:android-adapters:1.3.0') { 
    exclude module: 'recyclerview-v7' 
} 

(I 새로운 버전을 사용에도 불구하고, 전에이 문제가 없었 때문에 그것이 이상한 있지만 ...)

관련 문제