React native 非默认端口上的端口打包程序和调试-引发异常

React native 非默认端口上的端口打包程序和调试-引发异常,react-native,react-native-android,React Native,React Native Android,我在非默认端口上运行packager,因为McAfee使用以下命令占用了packager的默认端口: react-native start --port 8083 我运行应用程序 react-native run-android 和反向代理 adb -s emulator-5554 reverse tcp:8083 tcp:8083 该应用程序工作正常,但当我需要调试时,出现异常: Exception in native call com.facebook.react.bridg

我在非默认端口上运行packager,因为McAfee使用以下命令占用了packager的默认端口:

react-native start --port 8083
我运行应用程序

react-native run-android
和反向代理

adb -s emulator-5554 reverse tcp:8083 tcp:8083
该应用程序工作正常,但当我需要调试时,出现异常:

    Exception in native call
 com.facebook.react.bridge.JavaJSExecutor$ProxyExecutorException: com.facebook.react.common.JavascriptException: {"stack":"Error: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false' failed to load.\n    at executeApplicationScript (http://localhost:8083/debuggerWorker.js:40:9)\n    at http://localhost:8083/debuggerWorker.js:65:7"}
     at com.facebook.react.devsupport.WebsocketJavaScriptExecutor.loadApplicationScript(WebsocketJavaScriptExecutor.java:173)
     at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
     at android.os.Handler.handleCallback(Handler.java:739)
     at android.os.Handler.dispatchMessage(Handler.java:95)
     at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
     at android.os.Looper.loop(Looper.java:148)
     at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:208)
     at java.lang.Thread.run(Thread.java:818)
  Caused by: com.facebook.react.common.JavascriptException: {"stack":"Error: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false' failed to load.\n    at executeApplicationScript (http://localhost:8083/debuggerWorker.js:40:9)\n    at http://localhost:8083/debuggerWorker.js:65:7"}
     at com.facebook.react.devsupport.JSDebuggerWebSocketClient.onMessage(JSDebuggerWebSocketClient.java:209)
     at okhttp3.internal.ws.RealWebSocket$1.onMessage(RealWebSocket.java:62)
     at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:242)
     at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:108)
     at okhttp3.internal.ws.RealWebSocket.readMessage(RealWebSocket.java:97)
     at okhttp3.ws.WebSocketCall.createWebSocket(WebSocketCall.java:152)
     at okhttp3.ws.WebSocketCall.access$000(WebSocketCall.java:41)
     at okhttp3.ws.WebSocketCall$1.onResponse(WebSocketCall.java:97)
     at okhttp3.RealCall$AsyncCall.execute(RealCall.java:126)
     at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
     at java.lang.Thread.run(Thread.java:818) 
调试器以某种方式将我的设置与默认设置混合

如何设置项目以使调试工作正常