微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

与RxPermission冲突

如何解决与RxPermission冲突

我想在我的项目中使用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'
  

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。