react-native-vector-icons icon indicating copy to clipboard operation
react-native-vector-icons copied to clipboard

Unable to Build app due to compilation errors

Open Midnight-Coder opened this issue 9 years ago • 19 comments

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'

Midnight-Coder avatar Jun 12 '17 00:06 Midnight-Coder

@oblador Seems like this is coming from here:

nalyzing dependencies
Fetching podspec for `RNVectorIcons` from `../node_modules/react-native-vector-icons`
Downloading dependencies
Using RNVectorIcons (4.2.0)
Using React (0.11.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.

[!] React has been deprecated

Midnight-Coder avatar Jun 12 '17 06:06 Midnight-Coder

Hi did you figure out the problem. I have the same

freework-tech avatar Jun 13 '17 07:06 freework-tech

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 :-)

oblador avatar Jun 13 '17 20:06 oblador

Closing due to inactivity.

oblador avatar Jul 05 '17 20:07 oblador

@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?

azghibarta avatar Sep 30 '17 23:09 azghibarta

@AdrianZghibarta and @Midnight-Coder, I have the same problem. Have you solved the problem?

kostyaVyrodov avatar Oct 19 '17 15:10 kostyaVyrodov

@AdrianZghibarta @Midnight-Coder @oblador I have the same problem. How did you solve it?

BerndWessels avatar Oct 31 '17 02:10 BerndWessels

@kostyaVyrodov @BerndWessels I've made the native iOS link without Pods, instead I've used the "drag and drop from node_modules to Library folder" method

azghibarta avatar Nov 01 '17 21:11 azghibarta

The same with you guys! use 'react-native init xx' to create project, and pod install .

perzect avatar Nov 13 '17 08:11 perzect

I fixed by removing pod from Podfile and added font to xcode project as described in manually install option.

oun avatar Nov 17 '17 15:11 oun

get the same problem. i fixed it by this post: https://hk.saowen.com/a/6ae7c90b66feb20b5b61da3ca170a430f869d84ea7a3442c27cdcaf21c2724f2

welson327 avatar Feb 06 '18 06:02 welson327

Having the same problem here

ethanyuwang avatar Feb 26 '18 18:02 ethanyuwang

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

mattop1709 avatar Mar 02 '18 11:03 mattop1709

The same issue :(

lorenc-tomasz avatar Apr 19 '18 18:04 lorenc-tomasz

@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

ivancheng1214 avatar May 16 '18 06:05 ivancheng1214

I just made a hack-solution

change this

reject(@"font_load_failed", @"Font failed to load", error);

to

reject(error);

Karbaz avatar Aug 27 '18 12:08 Karbaz

@Karbaz I did do and resolved. However, Is it correct way?

shinriyo avatar Sep 25 '18 23:09 shinriyo

@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

Karbaz avatar Sep 26 '18 05:09 Karbaz

  • run react-native link react-native-vector-icons
  • check podfile delete pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons' or some pod auto insert there
  • pod install
  • clear and build project

anhdevit avatar Nov 22 '18 04:11 anhdevit