在 ios 上安装 react-native-vector-icons 和 运行 pod 更新后出现无效的 UIAccessibility 'tablist' 错误
Invalid UIAccessibilitys 'tablist' error after installing react-native-vector-icons and running pod update on ios
我尝试安装 react-native-vector-icons 和 运行 pod update 并收到以下错误:
https://i.stack.imgur.com/FcVr0.jpg
现在它弹出了,但我可以构建并且 运行 应用程序就好了。
这个可以吗?我该如何解决这个问题?
发生这种情况后,我取消了 react-native-vector-icons 的链接并卸载了它
但出于某种原因,我仍然遇到这个错误,现在我尝试调试它,它似乎与“@react-navigation/bottom-tabs”包有关。
我的package.json:
},
"dependencies": {
"@eva-design/eva": "^2.1.1",
"@react-navigation/bottom-tabs": "^6.2.0",
"@react-navigation/native": "^6.0.8",
"@react-navigation/native-stack": "^6.5.0",
"@ui-kitten/components": "^5.1.1",
"@viro-community/react-viro": "^2.20.2",
"react": "17.0.2",
"react-native": "0.65.1",
"react-native-safe-area-context": "^3.3.2",
"react-native-screens": "^3.11.1",
"react-native-svg": "^12.1.1",
"react-redux": "^7.2.6",
"redux": "^4.1.2",
"fsevents": "^2.3.2"
},
"devDependencies": {
"@babel/core": "^7.15.0",
"@babel/runtime": "^7.15.3",
"@react-native-community/eslint-config": "^3.0.0",
"babel-jest": "^27.0.6",
"eslint": "^7.32.0",
"jest": "^27.0.6",
"metro-react-native-babel-preset": "^0.66.2",
"react-native-codegen": "^0.0.7",
"react-test-renderer": "17.0.2"
},
"jest": {
"preset": "react-native"
}
非常感谢任何帮助:)
我遇到了同样的问题。我解决了它。
转到 node_modules -> @react-navigation -> bottom-tabs.
找到所有 accessibilityRole
(在文件 BottomTabBar 和 BottomTabItem 中 -> 它位于 bottom-tabs/lib/commonjs/views
和 bottom-tabs/lib/module/views
和 bottom-tabs/src/views
)并将其更改为 none
.
我把accessibilityRole="tablist"
改成了accessibilityRole="none"
并将 accessibilityRole: Platform.select({ ios: 'button', default: 'tab' })
更改为 accessibilityRole: Platform.select({ ios: 'button', default: 'none' })
这个问题将会得到解决。但是当你安装新包时,你必须重新安装:))
我尝试安装 react-native-vector-icons 和 运行 pod update 并收到以下错误: https://i.stack.imgur.com/FcVr0.jpg 现在它弹出了,但我可以构建并且 运行 应用程序就好了。 这个可以吗?我该如何解决这个问题?
发生这种情况后,我取消了 react-native-vector-icons 的链接并卸载了它 但出于某种原因,我仍然遇到这个错误,现在我尝试调试它,它似乎与“@react-navigation/bottom-tabs”包有关。
我的package.json:
},
"dependencies": {
"@eva-design/eva": "^2.1.1",
"@react-navigation/bottom-tabs": "^6.2.0",
"@react-navigation/native": "^6.0.8",
"@react-navigation/native-stack": "^6.5.0",
"@ui-kitten/components": "^5.1.1",
"@viro-community/react-viro": "^2.20.2",
"react": "17.0.2",
"react-native": "0.65.1",
"react-native-safe-area-context": "^3.3.2",
"react-native-screens": "^3.11.1",
"react-native-svg": "^12.1.1",
"react-redux": "^7.2.6",
"redux": "^4.1.2",
"fsevents": "^2.3.2"
},
"devDependencies": {
"@babel/core": "^7.15.0",
"@babel/runtime": "^7.15.3",
"@react-native-community/eslint-config": "^3.0.0",
"babel-jest": "^27.0.6",
"eslint": "^7.32.0",
"jest": "^27.0.6",
"metro-react-native-babel-preset": "^0.66.2",
"react-native-codegen": "^0.0.7",
"react-test-renderer": "17.0.2"
},
"jest": {
"preset": "react-native"
}
非常感谢任何帮助:)
我遇到了同样的问题。我解决了它。 转到 node_modules -> @react-navigation -> bottom-tabs.
找到所有 accessibilityRole
(在文件 BottomTabBar 和 BottomTabItem 中 -> 它位于 bottom-tabs/lib/commonjs/views
和 bottom-tabs/lib/module/views
和 bottom-tabs/src/views
)并将其更改为 none
.
我把accessibilityRole="tablist"
改成了accessibilityRole="none"
并将 accessibilityRole: Platform.select({ ios: 'button', default: 'tab' })
更改为 accessibilityRole: Platform.select({ ios: 'button', default: 'none' })
这个问题将会得到解决。但是当你安装新包时,你必须重新安装:))