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

RN 0.74.0: error: cannot find symbol super.replaceExistingNonRootView #5927

Closed
tapz opened this issue Apr 22, 2024 · 13 comments
Closed

RN 0.74.0: error: cannot find symbol super.replaceExistingNonRootView #5927

tapz opened this issue Apr 22, 2024 · 13 comments
Labels
Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android

Comments

@tapz
Copy link

tapz commented Apr 22, 2024

Description

Android build fails with RN 0.74.0.

/Users/tapani/projects/MyApp/app/node_modules/react-native-reanimated/android/src/reactNativeVersionPatch/ReanimatedUIManager/latest/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java:103: error: cannot find symbol
    super.replaceExistingNonRootView(oldTag, newTag);
         ^
  symbol: method replaceExistingNonRootView(int,int)
/Users/tapani/projects/MyApp/app/node_modules/react-native-reanimated/android/src/reactNativeVersionPatch/ReanimatedUIManager/latest/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java:116: error: cannot find symbol
    super.removeSubviewsFromContainerWithID(containerTag);
         ^
  symbol: method removeSubviewsFromContainerWithID(int)

Steps to reproduce

  1. Build for Android

Snack or a link to a repository

https://github.com/software-mansion/react-native-reanimated

Reanimated version

3.8.1

React Native version

0.74.0

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native

Architecture

Paper (Old Architecture)

Build type

Debug app & dev bundle

Device

Real device

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added Platform: Android This issue is specific to Android Missing repro This issue need minimum repro scenario labels Apr 22, 2024
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@avantmarketing1
Copy link

I'm having the same issue.

@ppritesh
Copy link

facing same issue.

@manish-cashify
Copy link

Use rc release: "react-native-reanimated": "^3.9.0-rc.1"

@irenegonzalez27
Copy link

Would you know when will v 3.9.0 be released?

@brim0049
Copy link

same issue

@brim0049
Copy link

same issue ebug UP-TO-DATE

Task :react-native-reanimated:packageNdkLibs NO-SOURCE

Task :react-native-reanimated:compileDebugJavaWithJavac FAILED

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

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

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
223 actionable tasks: 5 executed, 218 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor

C:\Users\Dell WorkStation\Desktop\mohammed\Algeria\node_modules\react-native-reanimated\android\src\reactNativeVersionPatch\ReanimatedUIManager\latest\com\swmansion\reanimated\layoutReanimation\ReanimatedUIManager.java:103: error: cannot find symbol
super.replaceExistingNonRootView(oldTag, newTag);
^
symbol: method replaceExistingNonRootView(int,int)
C:\Users\Dell WorkStation\Desktop\mohammed\Algeria\node_modules\react-native-reanimated\android\src\reactNativeVersionPatch\ReanimatedUIManager\latest\com\swmansion\reanimated\layoutReanimation\ReanimatedUIManager.java:116: error: cannot find symbol
super.removeSubviewsFromContainerWithID(containerTag);
^
symbol: method removeSubviewsFromContainerWithID(int)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-reanimated:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:

Run with --info option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 9s
info Run CLI with --verbose flag for more details.

@GoldZy11
Copy link

same issue ebug UP-TO-DATE

Task :react-native-reanimated:packageNdkLibs NO-SOURCE

Task :react-native-reanimated:compileDebugJavaWithJavac FAILED

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

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

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. 223 actionable tasks: 5 executed, 218 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor

C:\Users\Dell WorkStation\Desktop\mohammed\Algeria\node_modules\react-native-reanimated\android\src\reactNativeVersionPatch\ReanimatedUIManager\latest\com\swmansion\reanimated\layoutReanimation\ReanimatedUIManager.java:103: error: cannot find symbol super.replaceExistingNonRootView(oldTag, newTag); ^ symbol: method replaceExistingNonRootView(int,int) C:\Users\Dell WorkStation\Desktop\mohammed\Algeria\node_modules\react-native-reanimated\android\src\reactNativeVersionPatch\ReanimatedUIManager\latest\com\swmansion\reanimated\layoutReanimation\ReanimatedUIManager.java:116: error: cannot find symbol super.removeSubviewsFromContainerWithID(containerTag); ^ symbol: method removeSubviewsFromContainerWithID(int) Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 2 errors

FAILURE: Build failed with an exception.

* What went wrong:
  Execution failed for task ':react-native-reanimated:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

* Try:

Run with --info option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 9s info Run CLI with --verbose flag for more details.

I got the same issue

@GoldZy11
Copy link

I found the solution, just downgrade RN to 0.73.0 v, if you see this table, the Reanimated 0.8.1v don´t support RN 0.74.0.
imagen

@error-try-again
Copy link

From what I've gathered, replaceExistingNonRootView(int,int) & removeSubviewsFromContainerWithID(int containerTag) do not exist on the current parent/super class which is why the error is being thrown.

Since I'm only using reanimated as a dependency of "@react-navigation/drawer": "^6.6.11", I was able to get around the issue with the following hack & by commenting out the execution statements. Drawer works fine now.

I'm not sure how this workaround will affect other use-use cases.

node_modules/react-native-reanimated/android/src/reactNativeVersionPatch/ReanimatedUIManager/latest/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java

  @ReactMethod  
  @Deprecated  
  public void replaceExistingNonRootView(int oldTag, int newTag) {  
//    super.replaceExistingNonRootView(oldTag, newTag);  
  }  
  
  @ReactMethod  
  @Deprecated  
  public void removeSubviewsFromContainerWithID(int containerTag) {  
//    super.removeSubviewsFromContainerWithID(containerTag);  
  }

@abdulbari149
Copy link

Facing the same issue.

@florismettey
Copy link

florismettey commented May 1, 2024

Use rc release: "react-native-reanimated": "^3.9.0-rc.1"

Thx manish-cashify
react-native-reanimated 3.9.0 has been released https://github.com/software-mansion/react-native-reanimated/releases/tag/3.9.0
We can now use: "react-native-reanimated": "^3.9.0"

@tomekzaw
Copy link
Member

tomekzaw commented May 5, 2024

@tapz Thanks for opening this issue and everyone else for your comments.

For React Native 0.74 support, you'll need to upgrade to Reanimated 3.10.0 or newer.

@tomekzaw tomekzaw closed this as completed May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android
Projects
None yet
Development

No branches or pull requests