1

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

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

在“请求”方法上显示错误

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'
  
4

0 回答 0