Closed bhandanyan-nomad closed 3 weeks ago
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?
same error on v3.6.2
"react-native-reanimated": "^3.6.2"
"react-native": "0.71.15"
gradle-7.5.1
probably related to: https://github.com/facebook/react-native/pull/44341
the solution I found on stackoverflow seems to be working for me:
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 react-native-reanimated@3.7.1 . 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
Hi, this pull request can solve it.
For me, version 3.10.1
is working fine. Version 3.12.0
gives me the error above.
React Native version: 0.72.4 react-native-reanimated version: 3.11.0
The solution involves replacing the DevMenuUtils.java file located at _node_modules/react-native-reanimated/android/src/reactNativeVersionPatch/ReactHost/72/com/swmansion/reanimated/._
Here's the code to use in DevMenuUtils.java:
package com.swmansion.reanimated;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.ReactApplication;
import com.facebook.react.devsupport.interfaces.DevOptionHandler;
import com.facebook.react.devsupport.interfaces.DevSupportManager;
public class DevMenuUtils {
public static void addDevMenuOption(ReactApplicationContext context, DevOptionHandler handler) {
// In Expo, `ApplicationContext` is not an instance of `ReactApplication`
if (context.getApplicationContext() instanceof ReactApplication) {
final DevSupportManager devSupportManager =
((ReactApplication) context.getApplicationContext())
.getReactNativeHost()
.getReactInstanceManager()
.getDevSupportManager();
devSupportManager.addCustomDevOption(
"Toggle slow animations (Reanimated)", handler);
}
}
}
Fixed through https://github.com/software-mansion/react-native-reanimated/pull/6073 and https://github.com/software-mansion/react-native-reanimated/pull/6097 (there had to be a new PR because of monorepo migration, but all credits go to @gronxb). The fix will be available in the next nightly build or in a new stable version (probably 3.13).
Issue present in this version also "react-native-reanimated": "^3.5.4"
For anyone who needs this fix before the official release use patch-package to apply the changes (https://www.npmjs.com/package/patch-package)
Issue still persists for us.
Gradle 8.2
{
"react": "18.2.0",
"react-native": "0.72.15",
"react-native-reanimated": "^3.3.0",
}
@Mihai-github @IncrediblePony it got fixed in 3.13.0-rc.2
experimental release. It will be available in the next stable release, most likely 3.13.
I resolved an issue using the following setup:
React Native version: 0.72.4 react-native-reanimated version: 3.11.0
The solution involves replacing the DevMenuUtils.java file located at _node_modules/react-native-reanimated/android/src/reactNativeVersionPatch/ReactHost/72/com/swmansion/reanimated/._
Here's the code to use in DevMenuUtils.java:
package com.swmansion.reanimated; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.ReactApplication; import com.facebook.react.devsupport.interfaces.DevOptionHandler; import com.facebook.react.devsupport.interfaces.DevSupportManager; public class DevMenuUtils { public static void addDevMenuOption(ReactApplicationContext context, DevOptionHandler handler) { // In Expo, `ApplicationContext` is not an instance of `ReactApplication` if (context.getApplicationContext() instanceof ReactApplication) { final DevSupportManager devSupportManager = ((ReactApplication) context.getApplicationContext()) .getReactNativeHost() .getReactInstanceManager() .getDevSupportManager(); devSupportManager.addCustomDevOption( "Toggle slow animations (Reanimated)", handler); } } }
@Usmanqayyum109 Thanks, This worked for me!
Description
Android build failing on 3.12.0:
Steps to reproduce
Build android
Snack or a link to a repository
n/a
Reanimated version
3.12.0
React Native version
0.72.14
Platforms
Android
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes