在index.js下的AppRegistry.registerComponent(appName, () => App)
前插入一下代码:
console.ignoredYellowBox = [
'Warning: BackAndroid is deprecated. Please use BackHandler instead.',
'source.uri should not be an empty string',
'Invalid props.style key',
]
console.disableYellowBox = true // 关闭全部黄色警告