zoukankan      html  css  js  c++  java
  • RN错误随笔

    错误信息:.React Native 运行报错:Unable to resolve module 'AccessibilityInfo'
    复制代码
    可以看到在 异常的返回的JSON 结构中给出了推荐的解决方法 :
    
    This might be related to https://github.com/facebook/react-native/issues/4968
    
    To resolve try the following:
      
    1. Clear watchman watches: `watchman watch-del-all`.
      
    2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
      
    3. Reset Metro Bundler cache: `rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache`.  
    4. Remove haste cache: `rm -rf /tmp/haste-map-react-native-packager-*`."

    然而:以上方法并没有什么卵用,所以 这里是个深坑,其实原因很简单。官方不知道是不是xxx有问题了,最新版本0.56的貌似存在问题,,,,不测试就发布吗?坑!
    复制代码
    解决方案:降级,

    先卸载旧版本:

    npm uninstall -g react-native-cli

    npm uninstall -g react-native

    再装上指定版本:

    npm install -g react-native@0.55.4

    npm install -g react-native-cli@1.2.0

    创建项目时候 制定版本即可:

    react-native init --version="0.55.4" aapName

     此时便可以正常运行起来!!!

  • 相关阅读:
    Java学习
    Java学习
    Java学习
    Java学习
    Java学习
    Java 泛型(六):泛型
    Java 泛型(五):泛型
    第十六章:垃圾回收(Garbage Collection)相关概念
    Java 泛型(四):泛型
    Java 泛型(三):泛型在继承方面体现与通配符使用
  • 原文地址:https://www.cnblogs.com/Tmc-Blog/p/9869428.html
Copyright © 2011-2022 走看看