【问题标题】:Unable to load script.Make sure you're either running a Metro server无法加载脚本。请确保您正在运行 Metro 服务器
【发布时间】:2020-04-12 16:14:20
【问题描述】:

【问题讨论】:

    标签: react-native-android


    【解决方案1】:

    我通过以下步骤解决了这个问题。

    cd MyApp

    我遇到了一些 blacklist.js 一些字符问题。为此,我引用了此链接并替换了 sharedBlacklist 字符集。

    (How to resolve the error on 'react-native start')

    接下来,我运行以下代码 sn-p 来解决捆绑问题。(参考链接:

    https://medium.com/@adityasingh_32512/solved-unable-to-load-script-from-assets-index-android-bundle-bdc5e3a3d5ff)

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

    react-native run-android 然后,它开始工作。 希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 2020-01-05
      • 2022-08-20
      • 1970-01-01
      • 2019-09-30
      • 1970-01-01
      • 2020-11-13
      • 1970-01-01
      • 2020-02-14
      相关资源
      最近更新 更多