android - NullPointerException during application run -


when running application stooped null pointer exception.

problem occurring in 4th line

1. bundle arguments;   2.arguments = getarguments();   3.string viewtype=arguments.getstring("viewtype");   4.if(viewtype.equals("weekly")) { ...... } 

is there solution? please reply.

08-16 11:31:03.146: e/androidruntime(2675): fatal exception: main 08-16 11:31:03.146: e/androidruntime(2675): java.lang.nullpointerexception 08-16 11:31:03.146: e/androidruntime(2675): @ com.nv.netmdapp1.schedulecreatedialog$1.onclick(schedulecreatedialog.java:188) 08-16 11:31:03.146: e/androidruntime(2675): @ com.nv.netmdapp1.customviews.customalertdialog$builder$1.onclick(customalertdialog.java:110) 08-16 11:31:03.146: e/androidruntime(2675): @ android.view.view.performclick(view.java:3511) 08-16 11:31:03.146: e/androidruntime(2675): @ android.view.view$performclick.run(view.java:14109) 08-16 11:31:03.146: e/androidruntime(2675): @ android.os.handler.handlecallback(handler.java:605) 08-16 11:31:03.146: e/androidruntime(2675): @ android.os.handler.dispatchmessage(handler.java:92) 08-16 11:31:03.146: e/androidruntime(2675): @ android.os.looper.loop(looper.java:137) 08-16 11:31:03.146: e/androidruntime(2675): @ android.app.activitythread.main(activitythread.java:4424) 08-16 11:31:03.146: e/androidruntime(2675): @ java.lang.reflect.method.invokenative(native method) 08-16 11:31:03.146: e/androidruntime(2675): @ java.lang.reflect.method.invoke(method.java:511) 08-16 11:31:03.146: e/androidruntime(2675): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:784) 08-16 11:31:03.146: e/androidruntime(2675): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:551) 08-16 11:31:03.146: e/androidruntime(2675): @ dalvik.system.nativestart.main(native method)

this error log.any idea?

4.if(viewtype.equals("weekly")) ---> 4.if("weekly".equals(viewtype))


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -