How to resolve this issue Yesterday application was working, Today I run the same code giving me runtime error on splash screen activity.

E/AndroidRuntime: FATAL EXCEPTION: main
                  Process: com.planfisheye.fisheye, PID: 11217
                  java.lang.IllegalStateException: The global database holder is not initialized. Ensure you call FlowManager.init() before accessing the database.
                      at com.raizlabs.android.dbflow.config.FlowManager.checkDatabaseHolder(FlowManager.java:507)
                      at com.raizlabs.android.dbflow.config.FlowManager.getDatabaseForTable(FlowManager.java:138)
                      at com.raizlabs.android.dbflow.config.FlowManager.getModelAdapterOrNull(FlowManager.java:469)
                      at com.raizlabs.android.dbflow.config.FlowManager.getTableName(FlowManager.java:79)
                      at com.raizlabs.android.dbflow.sql.language.From.getTableAlias(From.java:43)
                      at com.raizlabs.android.dbflow.sql.language.From.getQuery(From.java:211)
                      at com.raizlabs.android.dbflow.sql.language.BaseModelQueriable.querySingle(BaseModelQueriable.java:67)
                      at com.raizlabs.android.dbflow.sql.language.BaseTransformable.querySingle(BaseTransformable.java:106)
                      at com.planfisheye.fisheye.database.AuthenticationQueries.getUserDetails(AuthenticationQueries.java:205)
                      at com.planfisheye.fisheye.SplashActivity.checkDatabase(SplashActivity.java:205)
                      at com.planfisheye.fisheye.SplashActivity.access$100(SplashActivity.java:49)
                      at com.planfisheye.fisheye.SplashActivity$3$1.run(SplashActivity.java:187)
                      at android.os.Handler.handleCallback(Handler.java:808)
                      at android.os.Handler.dispatchMessage(Handler.java:101)
                      at android.os.Looper.loop(Looper.java:166)
                      at android.app.ActivityThread.main(ActivityThread.java:7425)
                      at java.lang.reflect.Method.invoke(Native Method)
                      at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
1

There are 1 answers

0
muhammed rameez On

Try initialising your database in Application class of your project.