我无法在我的本机项目上使用底部标签导航器。有人知道为什么吗?

问题描述 投票:0回答:2
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'
import { NavigationContainer } from '@react-navigation/native'

这是错误消息。

Unable to resolve "react-native-screens" from "node_modules\@react-navigation\bottom-tabs\src\views\BottomTabView.tsx"
Failed building JavaScript bundle.
react-native bottomnavigationview
2个回答
0
投票
您安装了吗

npm install @react-navigation/bottom-tabs或如果您使用了纱线卷装管理器,

yarn add @react-navigation/bottom-tabs

如果添加了此软件包,是否更新了pod文件?

cd ios pod install


0
投票
安装以下软件包

npm install --save react-native-gesture-handler react-native-reanimated react-native-screens

检查文档https://reactnavigation.org/docs/getting-started/

希望这会有所帮助!

© www.soinside.com 2019 - 2024. All rights reserved.