EventBus - annotated @Subscribe method is never used

When using the greenrobot EventBus library, all @Subscribe -new methods are displayed in light gray with a warning The onMyEvent () method is never used in Android Studio.

Is there a way to automatically suppress this warning (since the method is not called directly from the code, but in response to an event on the event bus)?

+7
java android android-studio greenrobot-eventbus
source share
1 answer

You can disable it by pointing to the left of the code with a gray gray color.

Then, after the lamp icon appears, click and select "Suppress method annotated by org.greenrobot ..."


UPDATE

Found a new working plugin for EventBus 3 IntelliJ at eventbus3-intellij-plugin . This is the working fork of the Shinnosuke Kugimiya eventbus3-intellij-plugin .

Working with Android Studio 2.1.3.

+19
source share

All Articles