Execution failed for task ':aws-amplify_rtn-push-notification:compileDebugKotlin'. React native

41 Views Asked by At

I am using aws-amplify version 6.0.9 and @aws-amplify/rtn-push-notification version 1.1.11 with amplify pinpoint

    OS: macOS 13.3
    CPU: (8) x64 Apple M1
    Memory: 37.31 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.17.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.8.1 - ~/Documents/nueva-version/facebook-signin/node_modules/.bin/npm
    Watchman: 2023.05.08.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.3 AI-213.7172.25.2113.9014738
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.16.1 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.7 => 0.71.7 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found```


follow the following android steps from this link https://docs.amplify.aws/react-native/build-a-backend/push-notifications/set-up-push-notifications/, currently I have firebase installed running, and when I start the application and this appears

Error

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
    Execution failed for task ':aws-amplify_rtn-push-notification:compileDebugKotlin'.
> Compilation error. See log for more details

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
    java.lang.StackOverflowError (no error message)

* Try:
    > Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

    BUILD FAILED in 1m 30s

at makeError (/Users/PUSH-NOTIFICATION-ANDROID/node_modules/execa/index.js:174:9)
at /Users/PUSH-NOTIFICATION-ANDROID/node_modules/execa/index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (/Users/PUSH-NOTIFICATION-ANDROID/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:82:7)
at async Command.handleAction (/Users/PUSH-NOTIFICATION-ANDROID/node_modules/@react-native-community/cli/build/index.js:108:9)

Does anyone have any idea what it could be? thank you very much for your help

1

There are 1 best solutions below

0
Pratik Prakash Bindage On
  • Build error when configured Push Notification > Task :@aws-amplify_pushnotification:compileDebugJavaWithJavac FAILED : https://github.com/aws-amplify/amplify-js/issues/6177

  • Run the build with the --stacktrace option to get more information about the compilation error

    ./gradlew :aws-amplify_rtn-push-notification:compileDebugKotlin --stacktrace
    
  • f the error persists, you can try increasing the stack size for the Java Virtual Machine (JVM) by adding the following line to your gradle.properties file

    org.gradle.jvmargs=-Xss2m