diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.h b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.h index d447a501ef0394..b310f3bd2962be 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.h @@ -34,7 +34,11 @@ class ReactNativeConfig; class Scheduler; class SurfaceHandlerBinding; -class Binding : public jni::HybridClass, +struct JBinding : public jni::JavaClass { + constexpr static auto kJavaDescriptor = "Lcom/facebook/react/fabric/Binding;"; +}; + +class Binding : public jni::HybridClass, public SchedulerDelegate, public LayoutAnimationStatusDelegate { public: diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JFabricUIManager.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JFabricUIManager.cpp index a2ccdbf5d57078..48326b97c260b3 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JFabricUIManager.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JFabricUIManager.cpp @@ -13,8 +13,9 @@ namespace facebook::react { Binding* JFabricUIManager::getBinding() { static const auto bindingField = - javaClassStatic()->getField("mBinding"); + javaClassStatic()->getField("mBinding"); - return getFieldValue(bindingField)->cthis(); + return jni::static_ref_cast(getFieldValue(bindingField)) + ->cthis(); } } // namespace facebook::react