java.lang.RuntimeException: Unable to instantiate service com.example.waseem.geolocation.LocationService: java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] doesn't exist.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

This is caused by using legacy commands from older versions of Firebase. Look for the new documentation and try using only the new SDK

Solutions on the web

via GitHub by ch-muhammad-adil
, 1 year ago
Unable to instantiate service com.example.waseem.geolocation.LocationService: java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] doesn't exist.
via Stack Overflow by Unknown author, 2 years ago
Unable to instantiate service com.bustracker.PostData: java.lang.InstantiationException: class com.bustracker.PostData has no zero argument constructor
via Stack Overflow by MrPencil
, 2 years ago
Unable to instantiate service com.bustracker.TrackingService: java.lang.InstantiationException: class com.bustracker.TrackingService has no zero argument constructor
via Stack Overflow by Shaik MD Ashiq
, 5 months ago
Unable to instantiate service com.artqueen.aahaan.GCM.MyGcmListenerService: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, int)' on a null object reference
via Stack Overflow by Ben
, 8 months ago
Unable to instantiate service fr.solutis.solutis.notifications.NotificationDemandeService: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
via Stack Overflow by Ravindra Kushwaha
, 1 year ago
Unable to instantiate service service.MyFirebaseInstanceIDService: java.lang.ClassNotFoundException: Didn't find class "service.MyFirebaseInstanceIDService" on path: DexPathList[[zip file "/data/app/com.rk.servicepractise-1/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
java.lang.RuntimeException: Unable to instantiate service com.example.waseem.geolocation.LocationService: java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] doesn't exist.
at com.google.firebase.FirebaseApp.getInstance(Unknown Source)
at com.google.firebase.FirebaseApp.getInstance(Unknown Source)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
at com.example.waseem.geolocation.LocationService.(LocationService.java:34)
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.Class.newInstance(Class.java:1650)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 9 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Know the solutions? Share your knowledge to help other developers to debug faster.