Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

KMP Java Heap Error on Xcode while Archive Task

While I try to publish my KMP project, I got "Compilation failed: Java heap space" error on Archive task in Xcode.

> Task :composeApp:linkReleaseFrameworkIosArm64 FAILED

error: Compilation failed: Java heap space

* Source files:

* Compiler version: 1.9.22

* Output kind: FRAMEWORK

error: java.lang.OutOfMemoryError: Java heap space

> Task :composeApp:linkReleaseFrameworkIosArm64 FAILED

error: Compilation finished with errors

I can publish app on Android side but not on Apple side.

like image 767
Arda Kalo Avatar asked Aug 30 '26 23:08

Arda Kalo


1 Answers

With changing heapsize as org.gradle.jvmargs=-Xmx8192M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx8192M" on gradle.properties solved the problem.

like image 109
Arda Kalo Avatar answered Sep 03 '26 22:09

Arda Kalo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!