Crash - didn't find class "io.realm.internal.network.NetworkStateReceiver"
Hi, with the new Realm 2.0 I am getting crash as below:
java.lang.RuntimeException: Unable to instantiate receiver io.realm.internal.network.NetworkStateReceiver: java.lang.ClassNotFoundException: Didn't find class "io.realm.internal.network.NetworkStateReceiver"
Did you do a Clean + Rebuild? (you should)
Do you have Instant Run disabled? (you should)
I reproduced this.
conditions:
syncEnabled is false.
android.net.conn.CONNECTIVITY_CHANGE broadcast is fired.
The easiest way to reproduce this is to execute adb shell am broadcast -a android.net.conn.CONNECTIVITY_CHANGE
This is reproducible.
Yes, I have the same problem. Is there a way how to fix this?
2.0.1 will fix it
++;
I have the same problem
+1
+1
I have also encountered this problem
already fixed in releases branch.
please wait a bit
Same here, when can we expect 2.0.1?
@Dimous Only our Mobile Platform Extension does that. Mostly because it allows us to do more intelligent error handling.
We hope to be able to ship 2.0.1 today with a fix for this, and sorry for letting such a server error slipping through 😢
+1
+1
Same here, when can we a bug fix release ?
+1
is there any way to prevent the crash ?
Well until 2.0.1 is released, you can add a broadcast receiver by the same name in the same package and all that.
I added this class to my project with the same package Realm and now there is no crash. https://github.com/realm/realm-java/blob/1062d2462eaf841c215d7962dea979f65032fb5a/realm/realm-library/src/objectServer/java/io/realm/internal/network/NetworkStateReceiver.java Thanks