onMeasure 出现java.lang.NullPointerException 直接在xml中使用自定义的布局。如自定义了一个view的onMeasure方法,如果此时引用Application就容易发生NullPointExecption异常。