0

I got crashAnalytics error : In LoginPage xml file, I am using ImageView and give layout_height = "dimens/dp200" its value is 200dp and I also created 4 more dimens file (mdpi/hdpi/xdpi/xxdpi), put value of "dimens/dp200" in each file and default dimens file already created. Error in below

Fatal Exception: java.lang.RuntimeException Unable to start activity ComponentInfo{in.abc.me/in.abc.me.activities.splashandlogin.LoginActivity}: android.view.InflateException: Binary XML file line #20 in in.abc.me:layout/activity_login_vs2: Binary XML file line #20: You must supply a layout_height attribute.

Caused by android.view.InflateException Binary XML file line #20 in in.abc.me:layout/activity_login_vs2: Binary XML file line #20: You must supply a layout_height attribute.

Caused by java.lang.UnsupportedOperationException Binary XML file line #20: You must supply a layout_height attribute.

enter image description here

Anuj Vaish
  • 285
  • 1
  • 5
  • 19

1 Answers1

0

It is possible if your dimen is not under res\values\dimens.xml of this project. (Though from the screenshot I am thinking it should be, but can it still has no value declared there?) If values are under some other config (Say port layout, but not under generic layout config), you may face this issue. In most cases res should be mentioned under res\values*.xml for default values

sgupta
  • 535
  • 4
  • 8
  • Hi, dimen is under res\values\dimens.xml file and my all dimen under same path. I already check it, It mentioned under res\values*.xml but why its happen in crashAnalytics, I don't know – Anuj Vaish Sep 12 '22 at 07:22