[Solved:white_check_mark:] Hi, I'm trying to creat...
# compose-desktop
k
[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.
a
What if you add
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m
on
gradle.properties
? (It is copied from the comment on a new project)
1
k
Thank you! I increased Xmx to 4G, finnally that worked. I have a 16G machine, it takes 8G to build, that is crazy... 😂
👍 1