首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >react-native-vector-icons中的Bug,图标是日语的

react-native-vector-icons中的Bug,图标是日语的
EN

Stack Overflow用户
提问于 2020-09-24 09:15:40
回答 1查看 189关注 0票数 0

我有一个react原生应用程序。

我有一个应用程序,但当我使用图标(react-native-vector-icons)时,图标会用日语显示,例如:

我想使用的图标是"add“

Icon

但当我在我的应用程序上显示如下图标时:

bug

这个应用的代码是:

Code

代码:

代码语言:javascript
复制
const App = () => {
  return (
    <>
      <StatusBar barStyle="dark-content" />
      <SafeAreaView>
        <ScrollView
          contentInsetAdjustmentBehavior="automatic"
          style={styles.scrollView}>
          <Header />
          <View style={styles.body}>
            <View style={styles.sectionContainer}>
              <Text style={styles.sectionTitle}>Step One</Text>
              <Text style={styles.sectionDescription}>
                Edit <Text style={styles.highlight}>App.js</Text> to change this
                screen and then come back to see your edits.
                <Icon name="add" color="#000" size={22} />
              </Text>
          </View>
        </ScrollView>
      </SafeAreaView>
    </>
  );
};
});

React-native Doctor:

代码语言:javascript
复制
 Common
 ✓ Node.js
 ✓ yarn

Android
 ✖ JDK
   - Version found: 1.8.0_265
   - Version supported: >= 8
 ✖ Android Studio - Required for building and installing your app on Android
 ✓ Android SDK - Required for building and installing your app on Android
 ✓ ANDROID_HOME

Errors:   2
Warnings: 0

Usage
 › Press f to try to fix issues.
 › Press e to try to fix errors.
 › Press w to try to fix warnings.
 › Press Enter to exit.
EN

回答 1

Stack Overflow用户

发布于 2020-10-23 22:13:07

得到相同的issue.Follow这条指令:

编辑android/app/build.gradle (非android/build.gradle ),添加如下内容:

申请者:"../../node_modules/react-native-vector-icons/fonts.gradle“

然后重建。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64038250

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档