react-native
关闭全部黄色警告
import {AppRegistry,LogBox} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
LogBox.ignoreAllLogs(true)
AppRegistry.registerComponent(appName, () => App);
指定端口运行
npx react-native run-android --port 8899
提示 errno: -4058
npm cache clean -f
模拟器摇一摇
adb shell input keyevent KEYCODE_MENU
清除 Gradle 缓存
cd android
gradlew clean
查看密钥信息
keytool -list -v -keystore D:\app\xxx\android\app\xxxx.keystore
react-native-vector-icons/AntDesign 图标丢失
- 在 android\app\build.gradle 最后面添加需要引入的字体
project.ext.react = [
iconFontNames: [ 'AntDesign.ttf','FontAwesome.ttf' ]
]
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"