Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on android doesn't work (* What went wrong: Execution failed for task ':customerio-reactnative:compileDebugJavaWithJavac'. > error: invalid source release: 17) #361

Closed
hrqmonteiro opened this issue Nov 25, 2024 · 2 comments

Comments

@hrqmonteiro
Copy link

SDK version: 3.6.0

Are logs available? No, doesn't work

Describe the issue
Trying to build on android:

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':customerio-reactnative:compileDebugJavaWithJavac'.
> error: invalid source release: 17

* 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 6s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':customerio-reactnative:compileDebugJavaWithJavac'.
> error: invalid source release: 17

* 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 6s

    at makeError (/home/hrq/Code/Work/copper/packages/app/node_modules/execa/index.js:174:9)
    at /home/hrq/Code/Work/copper/packages/app/node_modules/execa/index.js:278:16
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async runOnAllDevices (/home/hrq/Code/Work/copper/packages/app/node_modules/react-native/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:82:7)
    at async Command.handleAction (/home/hrq/Code/Work/copper/packages/app/node_modules/@react-native-community/cli/build/index.js:108:9)
info Run CLI with --verbose flag for more details.

Screenshots
Doesn't build

Additional context
N/A

@mahmoud-elmorabea
Copy link
Contributor

Sorry to hear you are have some trouble with CIO SDK!

Let's break down the issue so we are in a better position to help you:

  • Is this the first time setting up the CIO RN SDK? or did you have a previous working setup that is now broken? If you had a previously working setup, what's the change you introduced to get the error?
  • Can you please give us more information about your environment?
    • What React Native version are you using?
    • What Gradle version is used for your Android project?
    • What Java version is installed on your machine? The error seems to indicate that you might not have Java 17 installed
  • Are you able to give us an example project to reproduce the issue?

With some more info about the environment of the app or a reproducer project, we would be happy to further assist with the issue.

Have a great day!

Copy link
Contributor

Closed because of inactivity. Feel free to respond and we can reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants