J
J
JustAleksei2014-07-08 16:03:06
Android
JustAleksei, 2014-07-08 16:03:06

Why does "Fatal Exception: java.lang.ArithmeticException (divide by zero)" appear inside View.java line 8075 (android.view.View.measure)?

Hello!
Created a project using the Android Studio wizard using fragments and the Master-Detail markup template.
On some androids v2.1 crashlytics reports an error:

java.lang.ArithmeticException: divide by zero
       at com.android.internal.view.menu.IconMenuView.layoutItemsUsingGravity(IconMenuView.java:216)
       at com.android.internal.view.menu.IconMenuView.layoutItems(IconMenuView.java:192)
       at com.android.internal.view.menu.IconMenuView.onMeasure(IconMenuView.java:469)
       at android.view.View.measure(View.java:8075)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3121)
       at android.widget.FrameLayout.onMeasure(FrameLayout.java:249)
       at android.view.View.measure(View.java:8075)
       at android.view.ViewRoot.performTraversals(ViewRoot.java:763)
       at android.view.ViewRoot.handleMessage(ViewRoot.java:1633)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:123)
       at android.app.ActivityThread.main(ActivityThread.java:4370)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:521)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
       at dalvik.system.NativeStart.main(NativeStart.java)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
ensiriuswOw, 2014-09-18
@JustAleksei

The variable you want to divide is zero.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question