react-native-reanimated: [V3] Exception in HostFunction: java.lang.NoSuchMethodError: no non-static method
Description
Hi there, just a clean build to test v3, my code:
import Animated from 'react-native-reanimated';
const App = () => {
return (
<Animated.View style={{width: 200, height: 200, backgroundColor: 'red'}} />
);
};
export default App;
got this error:
Exception in HostFunction: java.lang.NoSuchMethodError: no non-static method "Lcom/swmansion/reanimated/NativeProxy;.registerEventHandler(Lcom/swmansion/reanimated/nativeProxy/EventHandler;)V", js engine: hermes
package.json:
"dependencies": {
"@shopify/react-native-skia": "^0.1.175",
"react": "18.2.0",
"react-native": "0.71.3",
"react-native-gesture-handler": "^2.9.0",
"react-native-reanimated": "^3.0.0",
"react-native-safe-area-context": "^4.5.0",
"react-native-screens": "^3.20.0"
},
Steps to reproduce
just did a clean build with that packages.
Snack or a link to a repository
simple code, no need to repository
Reanimated version
3.0.0
React Native version
0.71.3
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
Android emulator
Device model
No response
Acknowledgements
Yes
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 22
- Comments: 45 (9 by maintainers)
Commits related to this issue
- [V3 bugfix] Change private methods to public ones (#4205) <!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please follow the template so that t... — committed to software-mansion/react-native-reanimated by Latropos a year ago
- Emoji waterfall example (#4233) This PR adds a cool emoji waterfall example. https://user-images.githubusercontent.com/20516055/225790891-8be3be80-55df-49f7-af81-2365d3e625db.mp4 Just see if it wor... — committed to AliMSbaee/react-native-reanimated by kacperkapusciak a year ago
- [V3 bugfix] Change private methods to public ones (#4205) <!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please follow the template so that t... — committed to wordpress-mobile/react-native-reanimated by Latropos a year ago
Just downgrade your react-native-reanimated from v3 to v2. It will start working 🚀
I don’t known, but this patch helps me with android 8 https://gist.github.com/balmasich/e13ae0b12d3b4ab166a6143204b87dae
@efstathiosntonas could you check please?
Reanimated 2.15.0 contains all those fixes, and Reanimated 3.1.0 will be released soon.
Also getting this error on Android 8.
No issue on Android 13
✅cleared cache. ✅also configured babel correctly.
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?
@mysport12 same here, affecting ~50 users that use old devices., rean
3.0.2
and rn0.71.4
I’m also facing the same issue React native version 69.5 Reanimated version 3.0.0 App crashed when using the react native drawer menu
Was there any work-around on this issue?
Also facing the same issue here
Hi, how does the release process work? The repo made a new patch 3.0.2 “just” to fix the typings but is not publishing a new patch once they merged a Pr that avoid a crash on Android 7/8 that prevent most people to use v3.
How do you decide when to update/patch or not or is there a release plan somewhere?
@dziekonskik you just have to open the file located at this given path and change the access modifiers from private to public as shown in the patch node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nativeProxy/NativeProxyCommon.java
I tested the latest version
3.1.0
and can confirm that it resolves the errorsame problem here, waiting for a official fixed release
@efstathiosntonas Reanimated nightly builds are published as GitHub Actions artifacts. In order to use them in your app, you will need to:
unzip react-native-reanimated-3.0.2.tgz
yarn add file:/path/to/the/react-native-reanimated-3.0.2.tgz
works great! thank you @hassancodess 😃
Same issue here:
Error: Exception in HostFunction: java.lang.NoSuchMethodError: no non-static method "Lcom/swmansion/reanimated/NativeProxy;.registerEventHandler(Lcom/swmansion/reanimated/nativeProxy/EventHandler;)V", js engine: hermes
Running
"react-native-reanimated": "^3.0.2",
with"react-native": "0.71.4",