Closed elite-mob closed 2 years ago
This exception is thrown when you call register. Here is what the code looks like
if (AndroidDependenciesDetector.isAndroidSDKAvailable() && !AndroidDependenciesDetector.areAndroidComponentsAvailable()) { // Crash if the user (developer) has not imported the Android compatibility library. throw new RuntimeException("It looks like you are using EventBus on Android, " + "make sure to add the \"eventbus\" Android library to your dependencies."); }
This leads me to believe you have this dependency implementation("org.greenrobot:eventbus-java:3.3.1")
instead of this which is for Android implementation("org.greenrobot:eventbus:3.3.1")
Hi,, I am a fan of this eventbus library and used that on the other projects well without getting any issues. But now, I am getting some odd issue with registering eventbus on the activity and got stuck with this part here...
java.lang.RuntimeException: It looks like you are using EventBus on Android, make sure to add the "eventbus" Android library to your dependencies.
I am getting this error on both - bluestack5 and emulators...
I've installed the library correctly for sure and getting this odd error. Is there any one who got the similar error before? Thank you.
=====================================================
java.lang.RuntimeException: It looks like you are using EventBus on Android, make sure to add the "eventbus" Android library to your dependencies. at org.greenrobot.eventbus.EventBus.register(EventBus.java:145) at com.abc.auth.TutorialActivity.onStart(TutorialActivity.java:45) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1425) at android.app.Activity.performStart(Activity.java:7825) at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3294) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221) at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
===========================================================