solve error: cannot access Publisher in Android Studio?

后端 未结 5 1376
野的像风
野的像风 2021-01-02 07:36

I am getting this error while compilation of my code:

Can anyone help me how to solve this error or what might be causing this error?

Edit1: Gradle

5条回答
  •  生来不讨喜
    2021-01-02 08:03

    in my case the Publisher class was belong to the RxJava library which was missing from my project so adding these two lines in my app/gradle file fixed the problem:

    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'

    implementation 'io.reactivex.rxjava2:rxjava:2.x.x'

提交回复
热议问题