skip to Main Content

reanimated is crashing with these errors
D:ProjectsTo DeleteNovacomApp V1.2.0.2NovacomApp V1.2.0.2node_modulesreact-native-reanimatedandroidsrcreactNativeVersionPatchReactHost72comswmansionreanimatedDevMenuUtils.java:5: error: cannot find symbol
private void addDevMenuOption(ReactApplicationContext context, DevOptionHandler handler) {
^
symbol: class ReactApplicationContext
location: class DevMenuUtils
D:ProjectsTo DeleteNovacomApp V1.2.0.2NovacomApp V1.2.0.2node_modulesreact-native-reanimatedandroidsrcreactNativeVersionPatchReactHost72comswmansionreanimatedDevMenuUtils.java:5: error: cannot find symbol
private void addDevMenuOption(ReactApplicationContext context, DevOptionHandler handler) {
^
symbol: class DevOptionHandler
location: class DevMenuUtils
D:ProjectsTo DeleteNovacomApp V1.2.0.2NovacomApp V1.2.0.2node_modulesreact-native-reanimatedandroidsrcmainjavacomswmansionreanimatednativeProxyNativeProxyCommon.java:85: error: addDevMenuOption(ReactApplicationContext,DevOptionHandler) has private access in DevMenuUtils
DevMenuUtils.addDevMenuOption(mContext.get(), this::toggleSlowAnimations);
^
D:ProjectsTo DeleteNovacomApp V1.2.0.2NovacomApp V1.2.0.2node_modulesreact-native-reanimatedandroidsrcreactNativeVersionPatchReactHost72comswmansionreanimatedDevMenuUtils.java:7: error: cannot find symbol
if (context.getApplicationContext() instanceof ReactApplication) {
^
symbol: class ReactApplication
location: class DevMenuUtils
D:ProjectsTo DeleteNovacomApp V1.2.0.2NovacomApp V1.2.0.2node_modulesreact-native-reanimatedandroidsrcreactNativeVersionPatchReactHost72comswmansionreanimatedDevMenuUtils.java:8: error: cannot find symbol
final DevSupportManager devSupportManager =
^
symbol: class DevSupportManager
location: class DevMenuUtils
D:ProjectsTo DeleteNovacomApp V1.2.0.2NovacomApp V1.2.0.2node_modulesreact-native-reanimatedandroidsrcreactNativeVersionPatchReactHost72comswmansionreanimatedDevMenuUtils.java:9: error: cannot find symbol
((ReactApplication) context.getApplicationContext())
^
symbol: class ReactApplication
location: class DevMenuUtils
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.
6 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.

When i run my app using npx react-native run-android, The app crashes with errors. This happened after deleting Node modules and yarn_lock file

module.exports = function (api) {
  api.cache(true);
  return {
    presets: ['module:metro-react-native-babel-preset'],
    plugins: [
      'react-native-reanimated/plugin',
    ],
  };
};

"react-native-reanimated": "^3.12.0", "react-native": "0.72.0",

2

Answers


  1. Same issue for me!
    "react-native": "0.72.7"
    "react-native-reanimated": "^3.12.0" and for 3.9

    Login or Signup to reply.
  2. Check in the node_modules folder which version you are installing. If it is not the one in package.json , try installing the corresponding version via npm: npm install [email protected] .
    Make sure to delete the react-native-reanimated folder of node_modules before and that the package version is not locked in the package-lock.json/yarn.lock .
    This solved my issue

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search