React native 如何摆脱"";“从预绑定文件加载”;消息

React native 如何摆脱"";“从预绑定文件加载”;消息,react-native,React Native,在启动屏幕之后,但在加载应用程序之前,屏幕顶部会出现一条“从预绑定文件加载”消息,显示时间仅为几百毫秒。我不介意在开发中这样做,但我在手机上运行时仍然看到这条消息。下面是我如何创建包的。有什么想法吗?谢谢 react-native bundle --platform ios --dev false --entry-file index.ios.js --bundle-output App/main.jsbundle --resetCache 将构建配置更改为发布 因此,您应该将构建配置更改为发

在启动屏幕之后,但在加载应用程序之前,屏幕顶部会出现一条“从预绑定文件加载”消息,显示时间仅为几百毫秒。我不介意在开发中这样做,但我在手机上运行时仍然看到这条消息。下面是我如何创建包的。有什么想法吗?谢谢

react-native bundle --platform ios --dev false --entry-file index.ios.js --bundle-output App/main.jsbundle --resetCache
将构建配置更改为发布 因此,您应该将
构建配置
更改为
发布

对于iOS,在Xcode中打开项目并选择产品→ 计划→ 编辑方案。。。(或按⌘ + 你也可以运行这个

react-native bundle --entry-file index.ios.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios
然后在xcode类AppDelegate.m中进行更改

 //jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];

  jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

这已经不需要了。(调整jsCodeLocation)这是一个不必要的复杂问题。这是正确的答案。但是,你知道如何为Android做到这一点吗?