-
-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(Android): Add backward compatibility for prefabs #2088
Conversation
implementation 'androidx.appcompat:appcompat:1.4.2' | ||
implementation 'androidx.fragment:fragment:1.3.6' | ||
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0' | ||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' | ||
implementation 'com.google.android.material:material:1.9.0' | ||
implementation 'com.google.android.material:material:1.6.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed, because of the error while building a project: Can't determine type for tag '<macro name="m3_comp_assist_chip_container_shape">?attr/shapeAppearanceCornerSmall</macro>
. Since we're not using any features from Material 3, it's more important to patch this (at least for now 😛).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🎉
This is step one toward zulip#5847. We hold back react-native-screens at 3.29.0. That's because 3.30 breaks compatibility with RN v0.68 in a certain way, and although the 3.31 release candidate addresses one source of that incompatibility -- software-mansion/react-native-screens#2088 -- there seems to be another. In particular, after the app starts up on Android, I get errors: Error: Requiring module "node_modules/react-native-screens/src/index.tsx", which threw an exception: Error: Exception in HostObject::get(propName:RNSModule): java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.zulipmobile.debug-cCKhUjMGcecB6tGNtf5jiQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.zulipmobile.debug-cCKhUjMGcecB6tGNtf5jiQ==/lib/arm64, /data/app/com.zulipmobile.debug-cCKhUjMGcecB6tGNtf5jiQ==/base.apk!/lib/arm64-v8a, /system/lib64]]] couldn't find "librnscreens.so" […] and TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[16], "react-native-screens").screensEnabled') This error is located at: in CardStack (at StackView.tsx:462) in KeyboardManager (at StackView.tsx:458) in SafeAreaProviderCompat (at StackView.tsx:455) in RNGestureHandlerRootView (at GestureHandlerRootView.android.tsx:22) in GestureHandlerRootView (at StackView.tsx:454) in StackView (at createStackNavigator.tsx:87) in StackNavigator (at AppNavigator.js:140) in AppNavigator (at ZulipNavigationContainer.js:65) in EnsureSingleNavigator (at BaseNavigationContainer.tsx:411) in BaseNavigationContainer (at NavigationContainer.tsx:91) in ThemeProvider (at NavigationContainer.tsx:90) in NavigationContainer (at ZulipNavigationContainer.js:58) in ZulipAppContainer (at ZulipMobile.js:83) […] which I don't really understand but I suspect might require us to adopt React Native's "Fabric" system which we don't want to bother with for this legacy app.
This is step one toward zulip#5847. We hold back react-native-screens at 3.29.0. That's because 3.30 breaks compatibility with RN v0.68 in a certain way, and although the 3.31 release candidate addresses one source of that incompatibility -- software-mansion/react-native-screens#2088 -- there seems to be another. In particular, after the app starts up on Android, I get errors: Error: Requiring module "node_modules/react-native-screens/src/index.tsx", which threw an exception: Error: Exception in HostObject::get(propName:RNSModule): java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.zulipmobile.debug-cCKhUjMGcecB6tGNtf5jiQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.zulipmobile.debug-cCKhUjMGcecB6tGNtf5jiQ==/lib/arm64, /data/app/com.zulipmobile.debug-cCKhUjMGcecB6tGNtf5jiQ==/base.apk!/lib/arm64-v8a, /system/lib64]]] couldn't find "librnscreens.so" […] and TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[16], "react-native-screens").screensEnabled') This error is located at: in CardStack (at StackView.tsx:462) in KeyboardManager (at StackView.tsx:458) in SafeAreaProviderCompat (at StackView.tsx:455) in RNGestureHandlerRootView (at GestureHandlerRootView.android.tsx:22) in GestureHandlerRootView (at StackView.tsx:454) in StackView (at createStackNavigator.tsx:87) in StackNavigator (at AppNavigator.js:140) in AppNavigator (at ZulipNavigationContainer.js:65) in EnsureSingleNavigator (at BaseNavigationContainer.tsx:411) in BaseNavigationContainer (at NavigationContainer.tsx:91) in ThemeProvider (at NavigationContainer.tsx:90) in NavigationContainer (at ZulipNavigationContainer.js:58) in ZulipAppContainer (at ZulipMobile.js:83) […] which I don't really understand but I suspect might require us to adopt React Native's "Fabric" system which we don't want to bother with for this legacy app.
Do we still need this code if we only support RN >= 71? https://github.com/software-mansion/react-native-screens#supported-react-native-version. cc @piaskowyk maybe we can revert some of the code. |
…n#2088) ## Description This PR fixes backward compatibility with React Native versions older than 0.71. The issue was caused by using prefabs in the screen transition animation feature. I added a check that makes this feature available since React Native 0.71 Tested against RN versions: - [x] 0.68 - [x] 0.69 - [x] 0.70 - [x] 0.71 - [x] 0.73 Fixes software-mansion#2082 --------- Co-authored-by: tboba <tymoteusz.boba@gmail.com>
Description
This PR fixes backward compatibility with React Native versions older than 0.71. The issue was caused by using prefabs in the screen transition animation feature. I added a check that makes this feature available since React Native 0.71
Tested against RN versions:
Fixes #2082