read
Using @JvmOverloads tag helps to avoid multiple constructors with Kotlin
The headache
It’s really possible that you had some code like:
As you can see there are all the constructors needed for a custom FrameLayout
but all with same “body”.
The remedy
Refactored with @JvmOverloads
: