17

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.

Prashant Mali
  • 191
  • 1
  • 1
  • 4

5 Answers5

16

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"
}
Lawrence Cheuk
  • 434
  • 1
  • 4
  • 13
2

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.

Julian Corrêa
  • 638
  • 12
  • 25
1

it's works for me

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

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 08 '22 at 14:02
0

Error Message: Failed to connect to the package server

https://stackoverflow.com/a/44992138/4315172

npx react-native start &

npx if you have the package not installed yet.

Use the & sign if you want to start it in the background for linux console. https://www.linux.com/training-tutorials/and-ampersand-and-linux/

Nico Grill
  • 129
  • 2
  • 6
-1

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
Mirza Hayat
  • 284
  • 5
  • 11