I am creating an app like Uber but I have ran into a problem after I got an error suddenly and the app crashed. I tried out many ways in order to get ride of this error but
Use com.firebase:geofire-android:2.1.1. Maybe it's a version problem. This solved it for me.
com.firebase:geofire-android:2.1.1