问题标签 [react-native-vector-icons]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
3532 浏览

react-native - Importing 'react-native-vector-icon' results 'Unable to resolve module '@expo/vector-icons' error

I ejected the project running 'expo eject'. Then I added 'react-native-vector-icon' to use font icons provided by that package. But, whenever I import that library to any of my js file. Though I'm importing 'react-native-vector-icon',it shows the above error.

TouristInformation.js

0 投票
2 回答
1167 浏览

react-native - react-native-vector-icons 插件上的 IcoMoon 彩色图标无法正常工作

我从 Icomoon 工具创建了一个字体包,以便能够在我的 react-native 应用程序上使用它。黑白图标似乎加载得很好,但彩色图标在应用程序中被破坏并被迫为黑白。我正在执行以下操作来添加它,(我还在资源文件夹中的 XCode 上手动添加了它,它的所有内容都链接在那里)

当我在页面中导入它们时,彩色的加载得很好,但是,它在每个图标旁边显示一个“多色”信息,好像这样做是错误的,或者我必须以不同的方式处理它?

在此处输入图像描述

在带有icomoon的矢量图标的文档中,没有太多关于它的信息。

任何人都知道为什么会这样?谢谢。

0 投票
4 回答
2523 浏览

ios - 找不到 react-native-vector-icons 的 RCTfont+FA5.h 文件

对于未找到 react-native-vector-icons RCTfont+FA5.h文件,我不知道我到底哪里出错了?

我做的步骤:

1.npm 我反应原生矢量图标

2.react-native 链接 react-native-vector-icons

并且在尝试构建时,我不断收到错误“RCTfont+FA5.h”未找到。

PS:我正在使用 cocoapods ,我确保我已经在 ios 文件夹中运行了 pod install 并且还使用 .xcworkspace 文件进行构建。

感谢您花时间阅读并尝试提供帮助。

0 投票
1 回答
3063 浏览

android - 使用 react-native-vector-icons 图标未显示在 android 屏幕上

我是 react-native 的新手,并在此处输入图像描述试图实现选项卡导航器。我正在使用 react-native-vector-icons。我试图在我的屏幕上显示图标,但它没有显示任何图标。这就是我所做的

1-npm 安装 react-native-vector-icons --save

2-react-native 链接 react-native-vector-icons

3-编辑 android/app/build.gradle

4- react-native run-android

在此处输入图像描述

0 投票
1 回答
417 浏览

react-native - 将 Native Base 与 React Native 元素结合使用

我最近安装了 Native Base,虽然我一直在使用 React Native Elements,但这还不够。我的构建一直失败,因为同一个目标会产生两条不同的路径,因为 Native Base 已经内置了 react-native-vector-icons,但我无法删除它,因为 React Native Elements 需要它才能运行。在这种情况下我该怎么办?感谢期待。

0 投票
2 回答
12331 浏览

react-native - 对材质图标使用 react-native-elements - 无法识别某些图标

使用下面的小吃: https ://snack.expo.io/ry_5rCk84

我正在尝试在我的 react native 应用程序中使用 Material Icons 显示图标“wifi_off”(只是在博览会上将其作为零食分享,以便于分享),但这不是道具“名称”的公认价值。最后显示一个“?” 对于未知的图标。我可以使用 ' material-community ' 图标集来使用wifi-off图标

在此处输入图像描述

0 投票
1 回答
2264 浏览

react-native - console.error : "fontFamily "Material Icons" 不是系统字体,还没有通过 Font.loadAsync 加载

我正在尝试从 react-native-vector-icons/MaterialIcons 添加一个图标:

但我得到:

console.error : "fontFamily "Material Icons" 不是系统字体,还没有通过 Font.loadAsync 加载

我尝试使用 Font.loadAsync

有任何想法吗?

0 投票
3 回答
8707 浏览

react-native - Unrecognized font family Material Icons?

Iam new to React-Native, I have added react-native-vector-icons library manually to Xcode and Android studio. if run the code with Xcode its executing successfully without any issue. but if i trying to run the code from Terminal (react-native run-ios) its showing 'Unrecognized font family Material' in simulator. but the same this working if i runs the command (react-native run-android).

please help me. this is the error showing in terminal Error Screen shot

0 投票
1 回答
972 浏览

react-native-android - React Native - 打开选项卡时应用程序崩溃

我的应用程序总是在 Android 模拟器中崩溃。

每次我将我的应用程序导航到主选项卡时,我的应用程序都会因错误而崩溃。我认为这不是由 React Native Navigation 引起的,我认为是因为 React Native Vector Icons 因为在 Android 中它需要为选项卡添加图标。这个错误只是突然出现而没有更改我的任何代码。

这是来自 React Native Debugger 的错误:

Uncaught (in promise) TypeError: Iterator value v is not an entry object
at new Map (native)
at file:///D:/Downloads/rn-debugger-windows-ia32/resources/app.asar/js/bundle。 js:9:8044
匿名

这些是我的依赖项:

随时询问我的代码和任何问题。谢谢!

0 投票
1 回答
908 浏览

react-native - react-native unrecognized font family FontAwesome5Pro-Solid

我使用 react-native-vector-icons 作为图标

我将所有 FontAwesome 网络字体放入 assets/fonts 并将此文件夹添加到 package.json 中的 rnpm 部分

然后我运行 react-native link

我在 info.plist 中看到的所有这些字体,但是当

我看到错误无法识别的字体系列 FontAwesome5Pro-Solid。这很有趣,但在我的旧 Macbook 上一切正常,我只是克隆我的存储库并运行项目,然后出现了这个错误......

在此处输入图像描述

我可以尝试解决这个问题吗?