[英]Bug in react-native-vector-icons, Icons is in japanese
I have a react-native app.我有一个本机应用程序。
I have an app but when i use icons(react-native-vector-icons) the icon show in japanese, example:我有一个应用程序,但是当我使用图标(react-native-vector-icons)时,图标显示为日语,例如:
The icon that i want to use is "add"我要使用的图标是“添加”
But when i show the icon on my app that show like this:但是当我在我的应用程序上显示如下所示的图标时:
The code of this app is:这个应用程序的代码是:
Code:代码:
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:反应原生医生:
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.
got same issue.Follow this instruction :遇到了同样的问题。请按照以下说明操作:
Edit android/app/build.gradle ( NOT android/build.gradle ) and add the following:编辑 android/app/build.gradle (不是 android/build.gradle )并添加以下内容:
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"申请自:“../../node_modules/react-native-vector-icons/fonts.gradle”
And rebuild.并重建。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.