When using Java reflect API, happened this error
Exception in thread "main" java.lang.IllegalArgumentException: Can not set final int field XXX.ABC.abc to java.lang.Integer
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
at sun.reflect.UnsafeQualifiedObjectFieldAccessorImpl.set(UnsafeQualifiedObjectFieldAccessorImpl.java:83)
at java.lang.reflect.Field.set(Field.java:764)
Although I know we can fix it by using java code ,But I wan’t know is there any way to solve it by Kotlin