at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:377)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:320)
at android.app.LoadedApk.makeApplication(LoadedApk.java:493)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4238)
at android.app.ActivityThread.access$1400(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1297)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4935)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
07-17 20:17:59.316 28301-28301/com.qingmedia.zhoudao E/LogUtils[error, 49]﹕ 检测到严重错误,程序即将退出
java.lang.NullPointerException
at com.zhy.android.percent.support.PercentLayoutHelper.shouldHandleMeasuredHeightTooSmall(PercentLayoutHelper.java:447)
at com.zhy.android.percent.support.PercentLayoutHelper.handleMeasuredStateTooSmall(PercentLayoutHelper.java:422)
at com.zhy.android.percent.support.PercentRelativeLayout.onMeasure(PercentRelativeLayout.java:89)
at android.view.View.measure(View.java:15557)
at android.widget.RelativeLayout.measureChild(RelativeLayout.java:602)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:415)
at com.zhy.android.percent.support.PercentRelativeLayout.onMeasure(PercentRelativeLayout.java:88)
at android.view.View.measure(View.java:15557)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:617)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:399)
at android.view.View.measure(View.java:15557)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5114)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1396)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:681)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:574)
at com.zhy.android.percent.support.PercentLinearLayout.onMeasure(PercentLinearLayout.java:29)
at android.view.View.measure(View.java:15557)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5114)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at android.view.View.measure(View.java:15557)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5114)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1396)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:681)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:574)
at android.view.View.measure(View.java:15557)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5114)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2397)
at android.view.View.measure(View.java:15557)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2001)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1242)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1417)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1135)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4579)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
at android.view.Choreographer.doCallbacks(Choreographer.java:555)
at android.view.Choreographer.doFrame(Choreographer.java:525)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4935)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
出现同样的错误,
而且不是每次都出现这个问题,
privatestaticboolean shouldHandleMeasuredHeightTooSmall(Viewview ,PercentLayoutInfoinfo){ intstate=ViewCompat. getMeasuredHeightAndState(view)&ViewCompat. MEASURED_STATE_MASK ; returnstate==ViewCompat. MEASURED_STATE_TOO_SMALL&&info. heightPercent. percent>= 0&&info. mPreservedParams. height==ViewGroup.LayoutParams. WRAP_CONTENT ;}
估计是info为null才报错的,
能判断下就应该能解决这个问题
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。