[Solved✅] Hi, I'm trying to create a multiplatform project with android and jvm targets. But I got
java.lang.OutOfMemoryError: Java heap space
on
:android:mergeExtDexDebug
task when building android mudule.
My compose version is "1.0.0-alpha3".
Here is my project structure:
common module
---- service (written as
expect class
)
---- compose ui, viewmodel (dependens on
service)
android module
----
actual
service
---- Activity that boots compose ui.
jvm module
----
actual
service (exactly the same as android)
---- Main function that boots compose ui.
If I only build jvm module, all work fine.
I try to move the code from common module to android module, and that works fine too.
My codes were shared to my github repository, as a branch (
https://github.com/Konyaco/CollinsDictionary/tree/multiplatform).
And I wonder that is there a best way to reuse code between JVM and Android targets? The apis are same in most occasions.