react-native-responsive-screen
react-native-responsive-screen copied to clipboard
Cannot resolve symbol 'heightPercentageToDP'
I'm using this library on Android with no problems, everything looks great and is responsive.
However, I'm trying to get it working on iOS and running into the errors "Cannot resolve symbol 'heightPercentageToDP'" and "Cannot resolve symbol 'widthPercentageToDP'" when I try to import these functions.
This is not just an issue with WebStorm not finding the functions, because the result when I run the app is that there is no styling -- all the margins and paddings are 0, the width of my TextInputs is the full screen, etc.
Any ideas why this isn't working for iOS? Thank you!
Hi @amduffy19
Try running rm -rf node_modules
form the root of the project and then yarn install && react-native link
I believe this should solve your issues.
If it doesn't then kindly let us know.
Why the react-native link
?
Why the
react-native link
?
To link any library he might reinstalled using the later command above, I would also like to point out that the react-native link
command is not compulsory though.
Since the problem is with iOS
, it might be worth trying to run cd ios && pod install && cd ..
. I find that if I've run rm -rf node_modules
and yarn install
and things aren't working, running pod install tends to fix things.