From 8b60097913796c6cd94d122e5e842b2e21869fe1 Mon Sep 17 00:00:00 2001 From: Christian Falch Date: Wed, 25 Mar 2026 10:23:37 +0100 Subject: [PATCH] fix(jni) fix exporting react/uimanager headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build.gradle.kts exports src/main/jni/react/fabric → react/fabric/ in the prefab headers, which includes StateWrapperImpl.h. That header does #include , but src/main/jni/react/uimanager is not in the prefab export list — so the header is simply missing from the AAR. This was introduced in #55288 where they modified StateWrapperImpl.h to inherit from StateWrapper and added the #include on StateWrapper.h. This has caused Expo's nightlies to break due to the missing header file in the prefabs: - Internally (when RN builds itself): Works fine because all JNI source dirs are on the include path - Externally (when consumers use the published AAR): StateWrapperImpl.h is included in the prefab, it references , but that header doesn't exist in the prefab package This commit fixes the above problem by including `src/main/jni/react/uimanager` in the prefab. I have tested and verified this by running this in the root of the repo: ``` ./gradlew :packages:react-native:ReactAndroid:preparePrefab ls packages/react-native/ReactAndroid/build/prefab-headers/reactnative/react/uimanager/ ``` Before the fix the uimanager folder was not found, with the fix it exists and contains the following files: ComponentNameResolverBinding.h StateWrapper.h UIConstantsProviderBinding.h There might be an issue with exporting these files in addition to the missing StateWrapper.h - but it seems like this is an issue with other folders in the jni / prefab - everything in a folder is exported when included for prefab. --- packages/react-native/ReactAndroid/build.gradle.kts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-native/ReactAndroid/build.gradle.kts b/packages/react-native/ReactAndroid/build.gradle.kts index c8435862e17c..7174913c3481 100644 --- a/packages/react-native/ReactAndroid/build.gradle.kts +++ b/packages/react-native/ReactAndroid/build.gradle.kts @@ -100,6 +100,8 @@ val preparePrefab by Pair("../ReactCommon/hermes/inspector-modern/", "hermes/inspector-modern/"), // fabricjni Pair("src/main/jni/react/fabric", "react/fabric/"), + // uimanagerjni + Pair("src/main/jni/react/uimanager", "react/uimanager/"), // glog Pair(File(buildDir, "third-party-ndk/glog/exported/").absolutePath, ""), // jsiinpsector