Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29449

ReactNative 0.59.x build fails on CircleCI with exit value 137

$
0
0

When building the app on CircleCI for v0.59.x it gives me the following error (It used to work fine till v0.57.8):

[12:45:19]: ▸ Note: Some input files use or override a deprecated API.
[12:45:19]: ▸ Note: Recompile with -Xlint:deprecation for details.
[12:45:19]: ▸ > Task :react-native-svg:processReleaseJavaRes NO-SOURCE
[12:45:19]: ▸ > Task :react-native-svg:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease
[12:45:19]: ▸ > Task :app:javaPreCompileQa
[12:45:44]: ▸ > Task :app:bundleQaJsAndAssets
[12:45:44]: ▸ warning: the transform cache was reset.
[12:46:00]: ▸ Loading dependency graph, done.
[12:46:19]: ▸ > Task :app:bundleQaJsAndAssets FAILED
[12:46:19]: ▸ FAILURE: Build failed with an exception.
[12:46:19]: ▸ * What went wrong:
[12:46:19]: ▸ Execution failed for task ':app:bundleQaJsAndAssets'.
[12:46:19]: ▸ > Process 'command 'node'' finished with non-zero exit value 137

I figure this has something to do with memory or Gradle/Java options because the build works fine on my local machine (./gradlew assembleRelease)

Useful snippets from circle config:

jobs:
  make-android:
    ...
    docker:
      - image: circleci/android:api-28-node8-alpha
    environment:
      TERM: dumb
      # JAVA_OPTS...
      # GRADLE_OPTS...
    steps:
      - checkout:
          path: *root_dir
      - attach_workspace:
          at: *root_dir
      - run:
          name: Build the app
          no_output_timeout: 30m
          command: bundle exec fastlane make

And fastlane make is

gradle(task: "clean")
gradle(task: "assembleRelease")

I tried multiple JAVA_OPTS and GRADE_OPTS, including removing them (it used to work fine with no _OPTS with v0.57.8)

JAVA_OPTS: "-Xms512m -Xmx4096m"
GRADLE_OPTS: -Xmx4096m -Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xms512m -Xmx4096m -XX:+HeapDumpOnOutOfMemoryError"
JAVA_OPTS: "-Xms512m -Xmx2048m"
GRADLE_OPTS: -Xmx2048m -Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"

I also have this in android/app/build.gradle

dexOptions {
    javaMaxHeapSize "2g"
    preDexLibraries false
}

Viewing all articles
Browse latest Browse all 29449

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>