Detected multiple Kotlin daemon sessions at build\kotlin\sessions - React-Native

Viewed 23198

I facing this issues while making release Build apk in react native.

check screenshot - https://prnt.sc/sro8ua

Task :app:createReleaseExpoManifest FAILED w: Detected multiple Kotlin daemon sessions at build\Kotlin\sessions

Please help me anyone facing the same issues.

5 Answers

It could be a lot of reasaons, I fixed it by:

step 1. go to ur_project/android/gradle.properties add the line

org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

step 2. go to ur_project/android/app/build.gradle, inside android{ .... } add

dexOptions {
   incremental true
   javaMaxHeapSize "4g"
}

Sometimes just delete Build folders and retry. In my case, this problem happen after upgrade the RN version, so cleaning the builds folders, has solved.

it's works for me

step1. cd android && ./gradlew clean step2. cd .. step3. npx react-native start

Enter the /android/gradle.properties file and add the following code

    org.gradle.daemon=true
    org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
    org.gradle.parallel=true
    org.gradle.configureondemand=true
Related