大家好
最近有玩一下 React Native
可以參考這邊
目前發現裡面需要用到 ICON ,找到這個
解決方案:
編輯
android/app/build.gradle
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" project.ext.vectoricons = [ iconFontNames: [ 'MaterialIcons.ttf', 'EvilIcons.ttf' ] // Name of the font files you want to copy ] apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
執行 react-native run-android
需要更新APK檔案
所謂的需要更新APK檔案就是需要重新安裝手機中的APK,例如移除之後再安裝,雖然 React Native 標榜及時編輯與修改,但是有關係到資源的部分,就是需要重新打包安裝。給大家參考囉,感恩。
留言板
歡迎留下建議與分享!希望一起交流!感恩!