Open iiitzniloy opened 3 years ago
There are some possible reasons why you are getting this error. Here are some of them:
You have not initialized or assigned a value to the String object that you are calling the equalsIgnoreCase method on. [Make sure that you have given a valid value to the String object before using it] You have passed a null value as an argument to the equalsIgnoreCase method. [Make sure that the argument that you are passing to the method is not null You have received a null value from a method or a database query that returns a String object. [Make sure that you check the return value of the method or the query before using it I hope these possible reasons help you find and fix your error.
java.lang.nullpointerexception: attempt to invoke virtual method 'boolean java.lang.string.equalsignorecase(java.lang.string)' on a null object reference at org.niloygazi.wirelesschat.sampleapi.parseresponse(sampleapi.java:327) at org.niloygazi.wirelesschat.sampleapi.access$200(sampleapi.java:24) at org.niloygazi.wirelesschat.sampleapi$responsehandler$1.run(sampleapi.java:95) at android.os.handler.handlecallback(handler.java:883) at android.os.handler.dispatchmessage(handler.java:100) at android.os.looper.loop(looper.java:224) at android.app.activitythread.main(activitythread.java:7592) at java.lang.reflect.method.invoke(native method) at com.android.internal.os.runtimeinit$methodandargscaller.run(runtimeinit.java:539) at com.android.internal.os.zygoteinit.main(zygoteinit.java:950)
screenshot of the bug:-