适用于:
Observable<String> observable = Observable.just("");
但无法解析just
Observable.just("");
我确定已导入rxjava2.jar
,Observable.just("")
在Eclipse中表现良好,但在IDEA中表现不佳。
答案 0 :(得分:1)
答案 1 :(得分:0)
I had the very same issue; I also saw similar behavior in the past, which drove me crazy for a long time, resulting in reinstalling the IDE.
Turns out, the problem was due to IntelliJ's idea.max.intellisense.filesize
setting. I had set it to 100KB, which was smaller than Observable's size.
This leads to weird results in IDEA/IntelliJ (mostly to the IDE not being able to find code/sources that are in the classpath.)
答案 2 :(得分:0)
当您要导入可观察的对象时,必须选择import io.reactivex.Observable; 但是您选择了错误导入android.database.Observable。
我希望这个提示对您有帮助