I created simple Base64Images
helper class which contains this body:
companion object{
val ABSTRACT_COLORS = "[image encoded in base64]"
}
ABSTRACT_COLORS
is actually a string which has 570438 characters.
During compilation I got:
org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Failed to generate property ABSTRACT_COLORS
...
...
The root cause was thrown at: ByteVector.java:213 at org.jetbrains.kotlin.codegen.MemberCodegen.genFunctionOrProperty(MemberCodegen.java:205)
Caused by: java.lang.IllegalArgumentException
I thought I can store 2147483647 (231 - 1) characters in a string.
Why is that?
I posted this image below.
You can use this tool to generate base64.
Hint: editing this class or compiling the project freezes Android Studio.
I'd use some lightweight editor to edit and terminal to compile it.