SimonVT/android-menudrawer

java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x1c

Opened this issue · 7 comments

giving UnsupportedOperationException with explanation Can't convert to dimension: type=0x1c on object initialization.

Add this line to your gradle.properties:

android.enableAapt2=false

and that will make it work. See here https://issuetracker.google.com/u/0/issues/65189965?pli=1

I tried add above line to my gradle.properties.
But it make issue yet when i launch application.
My project is kotlin.

same problem
java.lang.UnsupportedOperationException: Can't convert value at index 2 to dimension: type=0x3

@jinjin-lee Have you got any solution?

@pchauhan @jinjin-lee Hey guys, Facing same issue. Have you found any solution or identified cause of it?

it is 2020. same problem!!

I have do some research about it.
The problem is caused by having gradle version of 3.0.0+, the problem was with the in MenuDrawer.attach(Activity activity, Type type, Position position, int dragMode).

The simplest way to solve it was to downgrade the grade plugin and gradle version.
Currently my project is working fine even with AndroidX:

  • gradle version 2.3.3
  • gradle plugin 4.6