setEventEmitterCallback NoSuchMethodError during app startup on Android API 26 #48009
Labels
Needs: Triage 🔍
Platform: Android
Android applications.
Type: New Architecture
Issues and PRs related to new architecture (Fabric/Turbo Modules)
Description
Using the event emitter support in a RN 0.76.3 Turbo Module, the simulator or device crashes during app startup, with logcat error:
JNI DETECTED ERROR IN APPLICATION: JNI IsAssignableFrom called with pending exception java.lang.NoSuchMethodError: no non-static method "Lcom/calcturbo/CalcturboModule;.setEventEmitterCallback(Lcom/facebook/react/bridge/CxxCallbackImpl;)V"
This only happens when using Android API 26 (Oreo 8.1).
When using API 27 or higher it works fine. App runs also fine on iOS
Steps to reproduce
prerequisites: Android SDK 35 was installed and RN apps can be built on your mac
clone the git repo
cd ./ReproducerApp
if not installed yet, install yarn with
npm i -g yarn
yarn
start an android simulator with api 26 (Oreo 8.0)
npx react-native run-android
switch to another android simulator with api 27 (Oreo 8.1)
npx react-native run-android
should build and run fine
React Native Version
0.76.3
Affected Platforms
Runtime - Android
Areas
TurboModule - The New Native Module System
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/leoogh/RNBugRepro1
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: