Closed frazzmark closed 9 years ago
Don't have the time to dig deeper now, but as a quick fix, try replacing the line 179 in app/activities/StationsListActivity.java
from
if ((jsonDownloadTask.getStatus() == AsyncTask.Status.FINISHED)) {
to
if ((jsonDownloadTask != null && jsonDownloadTask.getStatus() == AsyncTask.Status.FINISHED)) {
I'll push a fix later in the day. Thanks for reporting it!
Welcome! However, I still cannot start the app, probably because the main activity (stations list) isn't shown until the welcome/setup activity ends. The error comes at inflating the menu.
public boolean onCreateOptionsMenu(Menu menu) {
this.optionsMenu = menu;
getMenuInflater().inflate(R.menu.stations_list, menu);
if (jsonDownloadTask.getStatus() == AsyncTask.Status.PENDING
|| jsonDownloadTask.getStatus() == AsyncTask.Status.RUNNING) {
setRefreshActionButtonState(true);
}
So, here are the logs again:
06-05 11:38:30.953 1932-1932/be.brunoparmentier.openbikesharing.app E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: be.brunoparmentier.openbikesharing.app, PID: 1932
java.lang.NullPointerException
at be.brunoparmentier.openbikesharing.app.activities.StationsListActivity.onCreateOptionsMenu(StationsListActivity.java:219)
at android.app.Activity.onCreatePanelMenu(Activity.java:2538)
at android.support.v4.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:277)
at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:436)
at com.android.internal.policy.impl.PhoneWindow.doInvalidatePanelMenu(PhoneWindow.java:800)
at com.android.internal.policy.impl.PhoneWindow$1.run(PhoneWindow.java:221)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
at android.view.Choreographer.doCallbacks(Choreographer.java:574)
at android.view.Choreographer.doFrame(Choreographer.java:543)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
The bug was introduced in https://github.com/bparmentier/OpenBikeSharing/commit/1d534b98adc2b58409a1480ec60bf4a0367e2869.
Feel free to reopen this issue if you still have problems.
I forked the repository and tried to compile the app. After a few failed attempts because of the missing android-support, I was finally able to compile it, but when I ran it in the emulator it crashed. Seems like it's trying to resume an app on first run, which is obviously not possible. Here are the adb logs