当我在 api 级别 14(4.0) 的模拟器上调试我的应用程序时,应用程序工作正常,但是当我在 xperia p api 级别 14(4.0.4) 上调试相同的应用程序时,应用程序不幸停止了,并且相同的应用程序在三星二重奏上调试它工作正常,应用程序在模拟器和三星移动 af api 级别 14 上运行良好,但为什么它不幸在 xperia p 上停止,API 级别为 14?
请帮助我理解这个问题。
以下是日志:
11-09 13:22:30.678: E/AndroidRuntime(7456): FATAL EXCEPTION: main
11-09 13:22:30.678: E/AndroidRuntime(7456): java.lang.IllegalArgumentException: DrawerLayout must be measured with MeasureSpec.EXACTLY.
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.support.v4.widget.DrawerLayout.onMeasure(DrawerLayout.java:591)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.view.View.measure(View.java:12911)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:599)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:381)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.view.View.measure(View.java:12911)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.widget.ScrollView.onMeasure(ScrollView.java:336)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.view.View.measure(View.java:12911)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4805)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.widget.FrameLayout.onMeasure(FrameLayout.java:297)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.view.View.measure(View.java:12911)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.widget.LinearLayout.measureVertical(LinearLayout.java:828)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.widget.LinearLayout.onMeasure(LinearLayout.java:557)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.view.View.measure(View.java:12911)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4805)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.widget.FrameLayout.onMeasure(FrameLayout.java:297)
11-09 13:22:30.678: E/AndroidRuntime(7456): at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2097)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.view.View.measure(View.java:12911)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1064)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.os.Handler.dispatchMessage(Handler.java:99)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.os.Looper.loop(Looper.java:137)
11-09 13:22:30.678: E/AndroidRuntime(7456): at android.app.ActivityThread.main(ActivityThread.java:4441)
11-09 13:22:30.678: E/AndroidRuntime(7456): at java.lang.reflect.Method.invokeNative(Native Method)
11-09 13:22:30.678: E/AndroidRuntime(7456): at java.lang.reflect.Method.invoke(Method.java:511)
11-09 13:22:30.678: E/AndroidRuntime(7456): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
11-09 13:22:30.678: E/AndroidRuntime(7456): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
11-09 13:22:30.678: E/AndroidRuntime(7456): at dalvik.system.NativeStart.main(Native Method)