更改React Native Debugging端口

时间:2017-08-29 23:59:22

标签: android react-native

我看到了一些问题question 1 tutorial,它们描述了如何更改打包器运行端口。但是,我不清楚如何更改本机代码上的列表端口。

我有一个像这样的代码的hybric应用程序

ReactInstanceManager.Builder builder = ReactInstanceManager.builder()
                .setApplication(application)
                .setDefaultHardwareBackBtnHandler(application.getGAMActivity())
                .setInitialLifecycleState(LifecycleState.RESUMED)
                .addPackage(new MainReactPackageWrapper())
                .setCurrentActivity((Activity) application.getGAMActivity())
                .addPackage(new StoreReactNativePackage())
                .addPackage(new ExceptionHandlerCustomPackage())
                .addPackage(new UtilsNativePackage(application))
                .addPackage(new SessionPackage(false, (Activity) application.getGAMActivity()))
                .addPackage(new MyCameraPackage())
                .addPackage(new RealmReactPackage())
                .addPackage(new FetchCustomPackage())
                .addPackage(new LocationServicesDialogBoxPackage())
                .addPackage(new RNDeviceInfo())
                .addPackage(new RCTPdfView())
                .addPackage(new MapsPackage())
                .addPackage(gamCommunicationReactPackage);

然后

 if (isrunningonpackager) {
            builder.setUseDeveloperSupport(true);
            builder.setBundleAssetName("index.android.bundle");
            builder.setJSMainModuleName("index.android");
        } else {
            builder.setBundleAssetName(myApplication.getAppName().concat(LocalAppsFilesManager.APPLICATION_BUNDLE_EXTENSION));
            builder.setJSMainModuleName(myApplication.getAppName().concat(".bundle"));
            builder.setUseDeveloperSupport(false);
        }

如何告诉构建器在另一个端口上查找打包器?

0 个答案:

没有答案