I am using expo sdk 47 Managed Workflow and try to build project with UI Kitten Framework
https://akveo.github.io/react-native-ui-kitten/
On iOS everything works fine.
On Android I have an issue Invariant Violation: requireNativeComponent: "RNSVGSvgViewAndroid" was not found in the UIManager.
Trying t find the solution and no luck.
Reinstalled everything several times.
I have
"@ui-kitten/components": "^5.1.2",
"expo": "~47.0.8",
"react": "18.1.0",
"react-native-svg": "^13.6.0",
The issue is with latest versions of expo SDK. Any ideas how to fix?
Does anybody has the same?
I found only this fresh question but it is related with another library and solution does not work for me.
Invariant Violation: requireNativeComponent: "RNSVGSvgViewAndroid" was not found in the UIManager
also tried with "react-native-svg": "^13.4.0" which is recommended by expo sdk47 but has another error (https://github.com/software-mansion/react-native-svg/issues/1899) which is recommended to fix by installing 13.5.0 but then I getting initial error.
After spending several days to find solution I have no other ideas rather than to ask here.
3
Answers
I got the error when I used "react-native-svg": "13.6.0", downgrading to "react-native-svg": "13.4.0" solved the issue.
You cannot use "react-native-svg": "13.6.0" with expo sdk 47 Managed Workflow because the native code is compiled there already, and it is compiled with "react-native-svg": "13.4.0" version of native code. Between those versions, the naming of native component changed, so when using "react-native-svg": "13.6.0", you update only the JS code, which tries to get new name of component from the native side, but the native code still has the previous name compiled. It resolves in such an error. Unfortunately there is no solution to this problem in managed workflow, the easiest solution would be to use EAS (https://expo.dev/eas) to build custom version of Expo Go app with "react-native-svg": "13.6.0" compiled in it.
when using expo run: