与RxPermission冲突

时间:2020-11-09 17:52:13

标签: gradle rxpermissions

我想在我的项目中使用tbruyelle RxPermissions库。我无法像这里一样调用subcribe方法

rxPermissions
    .request(Manifest.permission.ACCESS_FINE_LOCATION)
    .subscribe(granted -> {
        if (granted) {
           
        } else {
           
        }
    });

在方法“ request”上显示错误

Cannot access class 'io.reactivex.rxjava3.core.Observable'. Check your module classpath for missing or conflicting dependencies

我的build.gradle

repositories {
    //For YandexMap
    maven { url "http://maven.google.com/" }
    //For RxPermission
    maven { url 'https://jitpack.io' }
}
// rx - network
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'

// rx
implementation 'io.reactivex.rxjava2:rxjava:2.2.20'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'io.reactivex.rxjava2:rxkotlin:2.4.0'

//RxPermission
implementation 'com.github.tbruyelle:rxpermissions:0.12'
  

0 个答案:

没有答案