简体   繁体   中英

rxjava, cannot resolve symbol ‘just’ in Intellij IDEA

在此处输入图片说明

It works in:

Observable<String> observable = Observable.just("");

But cannot resolve symbol just in Observable.just("");

I'm sure I have imported the rxjava2.jar , and the Observable.just("") does well in Eclipse but not in IDEA.

File -> Project Structure -> Module -> + button click -> Library -> Maven

Searchbox -> Rx Java

by applying the stages to your project.

Maven Repos

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.)

when you wanna import observable you must select import io.reactivex.Observable; but you selected import android.database.Observable mistakenly.

i hope this hint helps you

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM