首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >渐弱的访问视图管理器直接通过UIManager通过UIManager['getConstants']吐露。

渐弱的访问视图管理器直接通过UIManager通过UIManager['getConstants']吐露。
EN

Stack Overflow用户
提问于 2019-09-17 09:48:45
回答 1查看 2.1K关注 0票数 4

我正面临这一警告,在我的反应本地博览应用。我还附加了我的package.json文件代码。请让我知道解决办法。谢谢

不再支持

通过UIManager‘’getConstants‘从UIManager直接访问视图管理器。使用UIManager.getViewManagerConfig('getConstants')代替。- node_modules\react-native\Libraries\YellowBox\YellowBox.js:67:8 in warn - node_modules\expo\build\environment\muteWarnings.fx.js:17:23 in warn - node_modules\react-native\Libraries\ReactNative\UIManager.js:164:12 in get - node_modules\react-native\Libraries\Utilities\defineLazyObjectProperty.js:42:18 in getValue - node_modules\react-native-gesture-handler\createHandler.js:39:2 in - node_modulesnode_modules\react-native-gesture-handler\NativeViewGestureHandler.js:3:0 in - node_modules\metro\src\lib\polyfills\require.js:331:6 in loadModuleImplementation - node_modules\react-native-gesture-handler\createNativeWrapper.js:3:0 in - node_modules\metro\src\lib\polyfills\require.js:331:6 in loadModuleImplementation -node_ \metro\src\lib\polyfills\require.js:331:6 \react原生-手势处理程序\GestureHandler.js:1:0 in - node_modules\metro\src\lib\polyfills\require.js:331:6 in loadModuleImplementation - node_modules\react-native-gesture-handler\Swipeable.js:10:0 in - node_modules\metro\src\lib\polyfills\require.js:331:6 in loadModuleImplementation - node_modules\react-native-gesture-handler\index.js:1:0 in - node_modules\metro\src\lib\polyfills\node_modules\react-navigation-stack\lib\module\views\StackView\StackViewLayout.js:1:942 in - node_modules\metro\src\lib\polyfills\require.js:331:6 in loadModuleImplementation - node_modules\react-navigation-stack\lib\module\views\StackView\StackView.js:1:670 in - node_modules\metro\src\lib\polyfills\require.js:331:6 in loadModuleImplementation - node_modules\react-navigation-stack\lib\module\navigators\createStackNavigator.js:1:122 in - node_modules\metro\src\lib\polyfills\require.js:331:6 in loadModuleImplementation - node_modules\react-navigation-stack\lib\module\index.js:1:35 in - node_modules\metro\src\lib\polyfills\require.js:331:6 in loadModuleImplementation * App.js:3:0 in - node_modules\metro\src\lib\polyfills\requirenode_modules\metro\src\lib\polyfills\require.js:331:6 in - node_modules\metro\src\lib\polyfills\require.js:197:45 in guardedLoadModule中的.js:331:6 *null:在全局代码中为null

Package.json

代码语言:javascript
复制
{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "expo": "^34.0.1",
    "react": "16.8.3",
    "react-dom": "^16.8.6",
    "react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz",
    "react-native-gesture-handler": "~1.3.0",
    "react-native-web": "^0.11.4",
    "react-navigation": "^4.0.2",
    "react-navigation-stack": "^1.5.4"
  },
  "devDependencies": {
    "babel-preset-expo": "^6.0.0"
  },
  "private": true
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-09-18 11:13:55

尝试使用1.3.0版本的react本机-手势-处理程序。

代码语言:javascript
复制
    "dependencies": {
          "react-native-gesture-handler": "^1.3.0",
    },

在终端中键入以下代码以安装:

代码语言:javascript
复制
    npm install react-native-gesture-handler@1.3.0

对我起作用了。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57971658

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档