avishayil / react-native-restart

React Native Package With One Purpose: To Restart Your React Native Project
MIT License
926 stars 145 forks source link

Breaking change in 0.0.27 #237

Open sai20459 opened 1 year ago

sai20459 commented 1 year ago

VERSION =0.027

> Task :react-native-restart:compileDebugJavaWithJavac FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
115 actionable tasks: 5 executed, 110 up-to-date

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-restart:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':react-native-restart:androidJdkImage'.
   > Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for JdkImageTransform: /home/naveen/Android/Sdk/platforms/android-33/core-for-system-modules.jar.
         > jlink executable /usr/lib/jvm/java-18-openjdk-amd64/bin/jlink does not exist.

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

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

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-restart:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':react-native-restart:androidJdkImage'.
   > Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for JdkImageTransform: /home/naveen/Android/Sdk/platforms/android-33/core-for-system-modules.jar.
         > jlink executable /usr/lib/jvm/java-18-openjdk-amd64/bin/jlink does not exist.

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

    at makeError (.../node_modules/execa/index.js:174:9)
    at .../node_modules/execa/index.js:278:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOnAllDevices (../node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:82:7)
    at async Command.handleAction (../node_modules/@react-native-community/cli/build/index.js:108:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Package is working fine with VERSION=0.0.24

Ahmadin29 commented 1 year ago

Same here

todorone commented 1 year ago

@avishayil Any hint on what could be the issue?

sajadspeed commented 1 year ago

Same here... I had to use the previous version. Any solution?

memon07 commented 1 year ago

same , issue hasn't been resolved till yet . any solutions ?

mednche commented 1 year ago

Same issue

SaeedZhiany commented 1 year ago

@avishayil

My project also fails with version 0.0.27. here is the stack trace. it seems config changes in the gradle file causes the problem.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file 'WORKSPACE_PATH\node_modules\react-native-restart\android\build.gradle' line: 23

* What went wrong:
A problem occurred evaluating project ':react-native-restart'.
> No signature of method: build_2k4vbuxm6hlvf6nnm9k7e5wd5.android() is applicable for argument types: (build_2k4vbuxm6hlvf6nnm9k7e5wd5$_run_closure1) values: [build_2k4vbuxm6hlvf6nnm9k7e5wd5$_run_closure1@7ddd09ef]

* 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:
A problem occurred configuring project ':react-native-restart'.
> compileSdkVersion is not specified. Please add it to build.gradle

* 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.
==============================================================================
rBurgett commented 1 year ago

I had the same problem and had to move back to 0.0.24.