美文网首页
react native 爬坑

react native 爬坑

作者: 聆听璇律 | 来源:发表于2018-08-15 11:08 被阅读21次

    1.Unable to resolve module 'AccessibilityInfo' 的解决方案
    解决:最终解决我困境的方案是

    0 准备: 关闭所有dev过程的console 窗口和IDE,Emulator也关了吧
    1 删除你的依赖文件夹 node_modules
    2 清除npm缓存 npm cache clean --force 3 重新安装npm依赖 npm install
    4 Clean RN 环境并重启试试 $ npm start -- --reset-cache
    上面的方法都不行的话,将 react-native 降版本(0.55.4) 解决

    2.Module build failed: Error: Plugin 0 specified in “base” … provided an invalid property of “default”

    解决:npm install --save-dev babel-preset-react-native@2.1.0 或者@4

    3.android打包

    react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/

    相关文章

      网友评论

          本文标题:react native 爬坑

          本文链接:https://www.haomeiwen.com/subject/yciibftx.html