![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
react-native
djgu
这个作者很懒,什么都没留下…
展开
-
React Native package.json 控制App的版本号
1. package.json "version": "0.0.1", 2. android配置 android/app/build.gradle import groovy.json.JsonSlurper ... /** * 获取版本号 */ def getAppVersion() { def inputFile = new File("../package.json") def packageJson = new JsonSlurper().parseText(inputFile原创 2021-06-17 10:52:02 · 719 阅读 · 0 评论 -
React Native 字体不随系统字体变化
import { AppRegistry, Text, TextInput, LogBox } from 'react-native'; import App from './src/App'; import { name as appName } from './app.json'; //字体不随系统字体变化 TextInput.defaultProps = Object.assign({}, TextInput.defaultProps, { allowFontScaling: false }); T原创 2021-06-15 17:50:15 · 265 阅读 · 0 评论 -
react native关闭黄色警告
react native关闭黄色警告0.63之前0.63之后 0.63之前 console.disableYellowBox = true; //关闭全部黄色警告 console.ignoredYellowBox = [ 'Warning: BackAndroid is deprecated. Please use BackHandler instead.', ... ]; 0.63之后 import { LogBox } from 'react-native'; LogBox.ignoreAll原创 2021-02-25 16:35:59 · 1057 阅读 · 0 评论