2017-03-04 2 views
0

에 대한 컴파일 방법을 찾지 못했습니다. 내 안드로이드 스튜디오 프로젝트를 동기화 할 때 오류 : [: rxandroid : io.reactivex 1.2.1] 인수 방법 컴파일() 타입의 객체는오류 : (9, 0) 인수 [(io.reactivex : rxandroid : 1.2.1)

내 build.gradle 파일

이하 org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler
// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 

    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.2.3' 
     compile 'io.reactivex:rxandroid:1.2.1' 
     compile 'io.reactivex:rxjava:1.1.9' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 

    repositories { 
     jcenter() 
    } 
} 

task clean(type: Delete) { 

    delete rootProject.buildDir 
} 

답변

1

이 라이브러리를 잘못된 섹션이라고 부릅니다. build.gradle 파일에는 두 가지 종류가 있습니다. 자세한 내용은 문제를 해결하기 위해 build.gradle

를 들어, 루트에서 종속을 제거 정확한 응용 프로그램 \의 build.gradle에게

로, 모듈 수준에서 build.gradle로 종속성을 요구 추가해야 'build.gradle'을 붙여서 app \ build.gradle에 붙여 넣으세요. io.reactivex : rxjava을 나는 build.gradle 모듈 레벨이 추가 할 때

android { 
    compileSdkVersion // YOURS 
    buildToolsVersion // YOURS 
    ........... 
     } 
    dependencies { 
      compile 'io.reactivex:rxandroid:1.2.1' 
      compile 'io.reactivex:rxjava:1.1.9' 
    } 

은 참고

그것은 최신 버전을 사용하는 것이 좋습니다는,

compile 'io.reactivex.rxjava2:rxandroid:2.0.1' 
compile 'io.reactivex.rxjava2:rxjava:2.0.1' 
+0

그것은 오류가 해결하지 못했습니다 도착 : 1.1.9 –

+0

@DipuKumar 무엇이 오류입니까? –

+1

오류 (29,13) 및 오류 (28,13) : 프로젝트 구조 대화 상자에서 오프라인 모드 사용 안함 및 파일 표시 쇼 동기화 –