Search code examples
androidandroid-studiodecompiling

Android:shape integer type is not allowed


I decompiled an APK (disclaimer: for personal use, not doing anything illegal) and aside from some weird unknown_attr values some attributes such as layout_width, layout_height and android:shape have integers as values.

Such as: <shape android:shape="0"></shape> or android:layout_width="-1"

When building an APK however, the android studio is throwing errors that integer types are not allowed.

Why is it that the decompiled APK can have integer types, but when re-compiling an APK it suddenly can't?

Do I have something misconfigured in my settings?


Solution

  • there is no misconfiguration in my studio settings that (when fixed) would allow me to build an APK with those integer values?

    No. That is an invalid ShapeDrawable resource, as you can tell by reading the documentation.

    Your problem lies in your decompiler.