在 项目根目录 index.js 文件中加入下列代码 import { LogBox } from 'react-native'; LogBox.ignoreAllLogs(true); // 关闭全部黄色警告