switchcompat - Getting crash while start the activity -
java.lang.nullpointerexception @ android.text.staticlayout.(staticlayout.java:59) @ android.support.v7.widget.switchcompat.makelayout(switchcompat.java:602) @ android.support.v7.widget.switchcompat.onmeasure(switchcompat.java:522) @ android.view.view.measure(view.java:16845) @ android.view.viewgroup.measurechildwithmargins(viewgroup.java:5374) @ android.widget.linearlayout.measurechildbeforelayout(linearlayout.java:1621) @ android.widget.linearlayout.measurehorizontal(linearlayout.java:1199) @ android.widget.linearlayout.onmeasure(linearlayout.java:609) @ android.view.view.measure(view.java:16845) @ android.widget.relativelayout.measurechildhorizontal(relativelayout.java:824) @ android.widget.relativelayout.onmeasure(relativelayout.java:500) @ android.view.view.measure(view.java:16845) @ android.view.viewgroup.measurechildwithmargins(viewgroup.java:5374) @ android.widget.framelayout.onmeasure(framelayout.java:340) @ android.view.view.measure(view.java:16845) @ android.view.viewgroup.measurechildwithmargins(viewgroup.java:5374) @ com.android.internal.widget.actionbaroverlaylayout.onmeasure(actionbaroverlaylayout.java:327) @ android.view.view.measure(view.java:16845) @ android.view.viewgroup.measurechildwithmargins(viewgroup.java:5374) @ android.widget.framelayout.onmeasure(framelayout.java:340) @ com.android.internal.policy.impl.phonewindow$decorview.onmeasure(phonewindow.java:2368) @ android.view.view.measure(view.java:16845) @ android.view.viewrootimpl.performmeasure(viewrootimpl.java:2296) @ android.view.viewrootimpl.measurehierarchy(viewrootimpl.java:1362) @ android.view.viewrootimpl.performtraversals(viewrootimpl.java:1559) @ android.view.viewrootimpl.dotraversal(viewrootimpl.java:1239) @ android.view.viewrootimpl$traversalrunnable.run(viewrootimpl.java:6278) @ android.view.choreographer$callbackrecord.run(choreographer.java:788) @ android.view.choreographer.docallbacks(choreographer.java:591) @ android.view.choreographer.doframe(choreographer.java:560) @ android.view.choreographer$framedisplayeventreceiver.run(choreographer.java:774) @ android.os.handler.handlecallback(handler.java:808) @ android.os.handler.dispatchmessage(handler.java:103) @ android.os.looper.loop(looper.java:193) @ android.app.activitythread.main(activitythread.java:5328) @ java.lang.reflect.method.invokenative(native method) @ java.lang.reflect.method.invoke(method.java:515) @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:838) @ com.android.internal.os.zygoteinit.main(zygoteinit.java:654) @ dalvik.system.nativestart.main(native method)
if using switchcompat use android:texton="on" , android:textoff="off" in xml. because texton , textoff labels null default value.
Comments
Post a Comment