react-native-vector-icons: Unable to Build app due to compilation errors
I am receiving the following error while building the react-native app:
/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:95:37: error: too many arguments to block call, expected 1, have 3
reject(@"font_load_failed", @"Font failed to load", error);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated
Note: I installed Vector-Icons using Cocoapods.
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 12
- Comments: 19 (2 by maintainers)
I fixed by removing pod from Podfile and added font to xcode project as described in manually install option.
Hi did you figure out the problem. I have the same
@oblador I have the same problem. I’ve created the RN project with “react-native init <project_name>” command but I’ve added the react-native-vector-icons using pods option. React native version is 0.48.3. What should I do?
get the same problem. i fixed it by this post: https://hk.saowen.com/a/6ae7c90b66feb20b5b61da3ca170a430f869d84ea7a3442c27cdcaf21c2724f2
@AdrianZghibarta and @Midnight-Coder, I have the same problem. Have you solved the problem?
The same issue 😦
@shinriyo
No Its not the right way.
I used to get error like as mention below. reject accept 1 argument but got 3 so this way i just pass 1 argument in reject function
This is just an hack for my solutions But its not the actual solutions for this error
I just made a hack-solution
change this
reject(@“font_load_failed”, @“Font failed to load”, error);
to
reject(error);
@lorenc-tomasz , this maybe useful to you. https://stackoverflow.com/questions/46883288/react-native-i-got-an-error-in-react-native-vector-icons-like-rejectfont-load/49713922#49713922?newreg=80f0adfc49da49d7bd0fa878d8bee6c3
Same with me. Facing problem to build React App due to Semantic Error. Installed the package using Cocoapods and manually, never able to build it
Closing due to inactivity.
Hey, you need to also install ReactNative with cocoapods if you integrate RNVI with it otherwise you’d be stuck with a duplicate and old version of RN 😃