arashpayan / Prayer-Book-Android

An Android app with Bahá'í prayers in multiple languages.
https://www.prayerbook.app
9 stars 4 forks source link

Crash in Database constructor #3

Closed arashpayan closed 10 years ago

arashpayan commented 10 years ago

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.arashpayan.prayerbook/com.arashpayan.prayerbook.CategoryPrayersActivity}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2100) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125) at android.app.ActivityThread.access$600(ActivityThread.java:140) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4898) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1008) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:775) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at com.arashpayan.prayerbook.Database.(Database.java:92) at com.arashpayan.prayerbook.Database.getInstance(Database.java:103) at com.arashpayan.prayerbook.PrayerFragment.onCreate(PrayerFragment.java:52) at android.support.v4.app.Fragment.performCreate(Fragment.java:1437) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:877) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1070) at android.support.v4.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:1856) at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:210) at com.arashpayan.prayerbook.CategoryPrayersActivity.onCreate(CategoryPrayersActivity.java:23) at android.app.Activity.performCreate(Activity.java:5206) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064) ... 11 more