Skip to content

Conversation

@protikbiswas100
Copy link
Contributor

What changed
added fabric support for windows, Fabric is the new architecture of react native

Why this change is needed

People using this library should be able to use the new architecture of react native

Testing
Added TurboModule enable flag via react-native.config.js. Wrote a minimal test to assert exported Config object and fallback logic.
Attached image of unit testing
testing

@luancurti luancurti merged commit 55382e6 into lugg:master Sep 2, 2025
1 check passed
@faljabi
Copy link

faljabi commented Sep 2, 2025

Still facing android build issues.

@protikbiswas100
Copy link
Contributor Author

protikbiswas100 commented Sep 2, 2025

I dont have any change outside of windows folder. It should not fail. There is something wrong in build configuration. @luancurti please look into it. Can you tell me how you release a new version

@trooperandz
Copy link

trooperandz commented Sep 2, 2025

@protikbiswas100 @luancurti I'm still getting an Android build error unfortunately. I tried cleaning and wiping out all cache etc for a sanity check:

I'm on react-native 0.79.5.

Screenshot 2025-09-02 at 12 30 24 PM

[CXX1429] error when building with cmake using /Users/me/Dev/repo/myProject/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/CMakeLists.txt: -- The C compiler identification is Clang 18.0.2

As soon as I remove the library, I can get a successful build to go through.

@KlutchKyle
Copy link

@protikbiswas100 @luancurti I'm still getting an Android build error unfortunately. I tried cleaning and wiping out all cache etc for a sanity check:

I'm on react-native 0.79.5.

Screenshot 2025-09-02 at 12 30 24 PM [CXX1429] error when building with cmake using /Users/me/Dev/repo/myProject/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/CMakeLists.txt: -- The C compiler identification is Clang 18.0.2

As soon as I remove the library, I can get a successful build to go through.

Facing the same issue with react-native-config

@Hasham24
Copy link

Hasham24 commented Sep 3, 2025

I am on react-native 0.81.0.
[CXX1429] error when building with cmake using /Users/me/Dev/repo/myProject/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/CMakeLists.txt: -- The C compiler identification is Clang 18.0.2
As soon as I remove the library, I can get a successful build to go through.
acing the same issue with react-native-config

@TrevorMCS
Copy link

@protikbiswas100 @luancurti I'm still getting an Android build error unfortunately. I tried cleaning and wiping out all cache etc for a sanity check:

I'm on react-native 0.79.5.

Screenshot 2025-09-02 at 12 30 24 PM [CXX1429] error when building with cmake using /Users/me/Dev/repo/myProject/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/CMakeLists.txt: -- The C compiler identification is Clang 18.0.2

As soon as I remove the library, I can get a successful build to go through.

Same issue on 0.81.1

@protikbiswas100
Copy link
Contributor Author

I have raised a pr https://github.com/lugg/react-native-config/pull/849/files to fix the build issue, waiting for @luancurti to review it

@trooperandz
Copy link

@protikbiswas100 I tested your branch and got a successful Android build!

@protikbiswas100
Copy link
Contributor Author

Okay I will be giving 3-4 prs. @luancurti please merge them. They are incremental changes to support fabric , the new architecture of react native in windows. This will help me narrow down the failure reason. I would need your help @trooperandz in testing the builds

@protikbiswas100
Copy link
Contributor Author

protikbiswas100 commented Sep 4, 2025

Can you please test my branch ( fabric-windows-implementation ) with my latest commit protikbiswas100@68500ad @trooperandz

@trooperandz
Copy link

@protikbiswas100 I tested the latest e966fcf and the build is failing again. Do you want me to test one commit before the latest specifically (68500ad) ?

@protikbiswas100
Copy link
Contributor Author

Yes please, you can test the commit Id 68500ad from my branch

@trooperandz
Copy link

Yes please, you can test the commit Id 68500ad from my branch

Okay; this might take me a bit since there was another commit on top of that.

@trooperandz
Copy link

trooperandz commented Sep 4, 2025

@protikbiswas100 I tested the 68500ad5c4f2a07dcfee5f2aaf1266daa863ba29 commit specifically, and got a bunch of linking errors.

:prepareKotlinBuildScriptModel
Android-autolinking.cmake 24 errors
ReactNative-application.cmake 1 error
  org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java 1 error 

@protikbiswas100
Copy link
Contributor Author

@trooperandz can you give me some details for building android like jdk version, build command etc so that I can reproduce the build

@trooperandz
Copy link

trooperandz commented Sep 4, 2025

@protikbiswas100 now I am having trouble building even when trying the other commit hashes. I am not sure which commit on your branch succeeded earlier.

Here are my details:

// build.gradle 
buildscript {
  ext {
    buildToolsVersion = "35.0.0"
    minSdkVersion = 24
    compileSdkVersion = 35
    targetSdkVersion = 35
    ndkVersion = "27.1.12297006"
    kotlinVersion = "2.0.21"
  }
}

// Miscellaneous version info
jdk 17.0.14
gradle version 8.13
react-native 0.79.5

// Build script
npx react-native run-android --mode debug

@protikbiswas100
Copy link
Contributor Author

@trooperandz dd2316e was the commit id when the build succeeded

@protikbiswas100
Copy link
Contributor Author

protikbiswas100 commented Sep 5, 2025

@trooperandz take my latest commit 98077af from https://github.com/protikbiswas100/react-native-config/commits/fabric-windows-implementation/ where you will find list of commits and build on fabric-windows-implementation branch and react-native-config version 1.5.7.

Few details to note:
Below is the JDK version needed to build android for different react native versions
RN 0.60-0.63: Java 8-11 ✅
RN 0.64-0.67: Java 8-11 ✅
RN 0.68+: Java 11-17 ✅
RN 0.71+: Java 11-17 ✅
RN 0.73+: Java 17+ ✅

We are using gradle 6.5 in react-native-config
you can find the JDK dependencies https://docs.gradle.org/current/userguide/compatibility.html

I ran npx react-native run-android --mode debug, for me it failed because it could not find emulator
But when I ran below you can see android build passed, gradlew.bat is a Gradle wrapper for windows for android build.

andoird

@protikbiswas100
Copy link
Contributor Author

@trooperandz

@protikbiswas100 now I am having trouble building even when trying the other commit hashes. I am not sure which commit on your branch succeeded earlier.

Here are my details:

// build.gradle 
buildscript {
  ext {
    buildToolsVersion = "35.0.0"
    minSdkVersion = 24
    compileSdkVersion = 35
    targetSdkVersion = 35
    ndkVersion = "27.1.12297006"
    kotlinVersion = "2.0.21"
  }
}

// Miscellaneous version info
jdk 17.0.14
gradle version 8.13
react-native 0.79.5

// Build script
npx react-native run-android --mode debug

https://github.com/lugg/react-native-config/blob/master/Example/android/gradle/wrapper/gradle-wrapper.properties#L3 I see here that gradle version 6.5 is required to build android, but in your build log I am seeing below

jdk 17.0.14
gradle version 8.13

@luancurti please let us know what is the correct build configuration for android

@trooperandz
Copy link

@protikbiswas100 @luancurti regarding the gradle version, react-native itself specifies the gradle version as 8.0.1 for react-native version of 0.72.x for example (was gradle 7.x before that). So react-native should be the go-to reference for which gradle version to use as a basic principle for the project.

For instance, react-native shows 8.13 in the gradle-wrapper.properties file for react-native 0.79.5; this is why my project is on that version.

@trooperandz
Copy link

trooperandz commented Sep 5, 2025

@protikbiswas100 a major update; I was able to get your branch to build successfully off of your last commit (98077afdf3eb9501e1f81d163c644134472b1afd).

Another build script from the command line that was also successful in addition to my Android Studio build (executed from the /android directory):
./gradlew app:assembleDebug

For a sanity check, after I got yours to build successfully, I tried going back to the react-native-config current 1.5.9 version to build again and it did fail. So it seems that your branch did indeed fix my Android problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants