-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
calendar keeps causing app to force close #6
Comments
I don't have your code but seeing this: Your instance of AgendaCalendarView is probably null. Check if you identified it from your layout. |
here is my code. thanks for the help package com.jenovaprojects.inkincardine.Events; import android.os.Bundle; import com.github.tibolte.agendacalendarview.AgendaCalendarView; import java.util.ArrayList; public class Events extends AppCompatActivity implements CalendarPickerController { //TODO:fix forceclose with calendar.
} |
ok mAgendaCalendarView is definitely null, please identify this view from your layout! An example: mAgendaCalendarView = (AgendaCalendarView) findViewById(R.id.agendacalendarview); |
Fixed it thanks!! |
I have implemented the agedacalendaras per readme, I have included your example events just as a place holder untill I get it set up and everytime I open it in app the app crashes. ...
here is the log
11-20 12:28:49.405 4470-4470/com.jenovaprojects.inkincardine E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.jenovaprojects.inkincardine, PID: 4470
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jenovaprojects.inkincardine/com.jenovaprojects.inkincardine.Events.Events}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.github.tibolte.agendacalendarview.AgendaCalendarView.init(java.util.List, java.util.Calendar, java.util.Calendar, java.util.Locale, com.github.tibolte.agendacalendarview.CalendarPickerController)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.github.tibolte.agendacalendarview.AgendaCalendarView.init(java.util.List, java.util.Calendar, java.util.Calendar, java.util.Locale, com.github.tibolte.agendacalendarview.CalendarPickerController)' on a null object reference
at com.jenovaprojects.inkincardine.Events.Events.onCreate(Events.java:59)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
The text was updated successfully, but these errors were encountered: