Open manakuro opened 1 month ago
I have a same problem with you.
Yup, same.
Same issue on Android. In iOS navigation is working fine.
I'm dealing with this aswell, anyone got a temp fix?
Workaround RN: 0.74.2 RNN: 7.40.0
node_modules\react-native-navigation\lib\android\app\src\main\java\com\reactnativenavigation\utils\ReactTypefaceUtils.java
if ((weight == Typeface.BOLD) || ((oldStyle & Typeface.BOLD) != 0 && weight == ReactTextShadowNode.UNSET)) { replace if ((weight == Typeface.BOLD) || ((oldStyle & Typeface.BOLD) != 0)) {
if ((style == Typeface.ITALIC) || ((oldStyle & Typeface.ITALIC) != 0 && style == ReactTextShadowNode.UNSET)) { replace if ((style == Typeface.ITALIC) || ((oldStyle & Typeface.ITALIC) != 0)) {
The workaround could be to change the ReactTextShadowNode.UNSET
to the ReactConstants.UNSET
and apply the patch.
diff --git a/lib/android/app/src/main/java/com/reactnativenavigation/utils/ReactTypefaceUtils.java b/lib/android/app/src/main/java/com/reactnativenavigation/utils/ReactTypefaceUtils.java
index 834d734f154a9e25cbf53a8ae20de6b9f7e215b7..fe0336d17e8ea689a7ae3cab06554b7da76f5a1b 100644
--- a/lib/android/app/src/main/java/com/reactnativenavigation/utils/ReactTypefaceUtils.java
+++ b/lib/android/app/src/main/java/com/reactnativenavigation/utils/ReactTypefaceUtils.java
@@ -18,8 +18,8 @@ import android.graphics.Typeface;
import android.text.TextUtils;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableArray;
+import com.facebook.react.common.ReactConstants;
import com.facebook.react.views.text.ReactFontManager;
-import com.facebook.react.views.text.ReactTextShadowNode;
import java.util.ArrayList;
import java.util.List;
@@ -96,12 +96,12 @@ public class ReactTypefaceUtils {
int want = 0;
if ((weight == Typeface.BOLD)
- || ((oldStyle & Typeface.BOLD) != 0 && weight == ReactTextShadowNode.UNSET)) {
+ || ((oldStyle & Typeface.BOLD) != 0 && weight == ReactConstants.UNSET)) {
want |= Typeface.BOLD;
}
if ((style == Typeface.ITALIC)
- || ((oldStyle & Typeface.ITALIC) != 0 && style == ReactTextShadowNode.UNSET)) {
+ || ((oldStyle & Typeface.ITALIC) != 0 && style == ReactConstants.UNSET)) {
want |= Typeface.ITALIC;
}
Any solution?
The merge request https://github.com/wix/react-native-navigation/pull/7886 is still in draft status
What happened?
The build failed on Android because of not resolving the symbol
ReactTextShadowNode.UNSET
on RN 0.74.1 anymore.https://github.com/wix/react-native-navigation/blob/dde5643bba30a32f9c38b9910da2cbc05355342a/lib/android/app/src/main/java/com/reactnativenavigation/utils/ReactTypefaceUtils.java#L99
Since the code was refactored in this PR on 0.74.1, instead of using the
ReactTextShadowNode.UNSET
, we need to switch it to theReactConstants.UNSET
.What was the expected behaviour?
The build succeeded.
Was it tested on latest react-native-navigation?
Help us reproduce this issue!
Build on RN 0.74.1.
In what environment did this happen?
React Native Navigation version: 7.39.2 React Native version: 0.74.1 Has Fabric (React Native's new rendering system) enabled: no Node version: 20.12.2 Device model: Android version: 14