Repository: react-native
Issue: createBundleReleaseJsAndAssets\index.android.bundle:1322:18: warning: the variable "DebuggerInternal" was not declared in function "__shouldPauseOnThrow"  typeof DebuggerInternal !== 'undefined'
Labels: Help Wanted :octocat:,Platform: Android,📦Bundler

### Description

React Native0.74.3  
Build release package 
"apk": "cd android && ./gradlew aR",
"aab": "cd android && ./gradlew bundleRelease"
The packaging was successful and the program can be used normally, but it outputs many warnings

android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:1322:18: warning: the variable "DebuggerInternal" was not declared in function "__shouldPauseOnThrow"
          typeof DebuggerInternal !== 'undefined' &&
                 ^~~~~~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:6550:7: warning: the variable "setTimeout" was not declared in function "logCapturedError"
      setTimeout(function () {
      ^~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:4660:31: warning: the variable "nativeFabricUIManager" was not declared in anonymous function " 133#"
  var _nativeFabricUIManage = nativeFabricUIManager,
                              ^~~~~~~~~~~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:4688:21: warning: the variable "clearTimeout" was not declared in anonymous function " 133#"
    cancelTimeout = clearTimeout;
                    ^~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:9318:30: warning: the variable "__REACT_DEVTOOLS_GLOBAL_HOOK__" was not declared in anonymous function " 133#"
  if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:11730:5: warning: the variable "setImmediate" was not declared in function "handleResolved"
    setImmediate(function () {
    ^~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16001:12: warning: the variable "fetch" was not declared in anonymous function " 369#"
    fetch: fetch,
           ^~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16002:14: warning: the variable "Headers" was not declared in anonymous function " 369#"
    Headers: Headers,
             ^~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16003:14: warning: the variable "Request" was not declared in anonymous function " 369#"
    Request: Request,
             ^~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16004:15: warning: the variable "Response" was not declared in anonymous function " 369#"
    Response: Response
              ^~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16161:24: warning: the variable "FileReader" was not declared in function "readBlobAsArrayBuffer"
      var reader = new FileReader();
                       ^~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16212:36: warning: the variable "Blob" was not declared in anonymous function
" 380#"
        } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
                                   ^~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16214:40: warning: the variable "FormData" was not declared in anonymous function " 380#"
        } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
                                       ^~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16216:44: warning: the variable "URLSearchParams" was not declared in anonymous function " 380#"
...e if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body...
                                 ^~~~~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16335:26: warning: the variable "AbortController" was not declared in anonymous function " 386#"
          var ctrl = new AbortController();
                         ^~~~~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16469:23: warning: the variable "XMLHttpRequest" was not declared in anonymous function " 390#"
        var xhr = new XMLHttpRequest();
                      ^~~~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16014:71: warning: the variable "self" was not declared in anonymous function
" 372#"
...undefined' && globalThis || typeof self !== 'undefined' && self ||
                                      ^~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:26274:27: warning: the variable "performance" was not declared in anonymous function " 685#"
  if ("object" === typeof performance && "function" === typeof performance.no...
                          ^~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:26297:26: warning: the variable "navigator" was not declared in anonymous function " 685#"
  "undefined" !== typeof navigator && undefined !== navigator.scheduling && u...
                         ^~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:26407:37: warning: the variable "MessageChannel" was not declared in anonymous function " 685#"
  };else if ("undefined" !== typeof MessageChannel) {
                                    ^~~~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:26422:34: warning: the variable "nativeRuntimeScheduler" was not declared in anonymous function " 685#"
... = "undefined" !== typeof nativeRuntimeScheduler ? nativeRuntimeScheduler....
                             ^~~~~~~~~~~~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:35520:34: warning: the variable "requestAnimationFrame" was not declared in function "start 9#"
...    this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));
                              ^~~~~~~~~~~~~~~~~~~~~

### Steps to reproduce

1 Set up development environment
2 Configure Android environment and run successfully
3 Configuration packaging (release)
These warnings will not be prompted in the development environment, only in the production environment

### React Native Version

0.74.3

### Affected Platforms

Runtime - Android, Build - Windows

### Areas

Other (please specify)

### Output of `npx react-native info`

```text
windwo 10
android     
        buildToolsVersion = "34.0.0"
        minSdkVersion = 23
        compileSdkVersion = 34
        targetSdkVersion = 34
        ndkVersion = "26.1.10909125"
        kotlinVersion = "1.9.22"
node 18.20.4
```


### Stacktrace or Logs

```text
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:1322:18: warning: the variable "DebuggerInternal" was not declared in function "__shouldPauseOnThrow"
          typeof DebuggerInternal !== 'undefined' &&
                 ^~~~~~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:6550:7: warning: the variable "setTimeout" was not declared in function "logCapturedError"
      setTimeout(function () {
      ^~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:4660:31: warning: the variable "nativeFabricUIManager" was not declared in anonymous function " 133#"
  var _nativeFabricUIManage = nativeFabricUIManager,
                              ^~~~~~~~~~~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:4688:21: warning: the variable "clearTimeout" was not declared in anonymous function " 133#"
    cancelTimeout = clearTimeout;
                    ^~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:9318:30: warning: the variable "__REACT_DEVTOOLS_GLOBAL_HOOK__" was not declared in anonymous function " 133#"
  if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:11730:5: warning: the variable "setImmediate" was not declared in function "handleResolved"
    setImmediate(function () {
    ^~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16001:12: warning: the variable "fetch" was not declared in anonymous function " 369#"
    fetch: fetch,
           ^~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16002:14: warning: the variable "Headers" was not declared in anonymous function " 369#"
    Headers: Headers,
             ^~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16003:14: warning: the variable "Request" was not declared in anonymous function " 369#"
    Request: Request,
             ^~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16004:15: warning: the variable "Response" was not declared in anonymous function " 369#"
    Response: Response
              ^~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16161:24: warning: the variable "FileReader" was not declared in function "readBlobAsArrayBuffer"
      var reader = new FileReader();
                       ^~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16212:36: warning: the variable "Blob" was not declared in anonymous function
" 380#"
        } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
                                   ^~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16214:40: warning: the variable "FormData" was not declared in anonymous function " 380#"
        } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
                                       ^~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16216:44: warning: the variable "URLSearchParams" was not declared in anonymous function " 380#"
...e if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body...
                                 ^~~~~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16335:26: warning: the variable "AbortController" was not declared in anonymous function " 386#"
          var ctrl = new AbortController();
                         ^~~~~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16469:23: warning: the variable "XMLHttpRequest" was not declared in anonymous function " 390#"
        var xhr = new XMLHttpRequest();
                      ^~~~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:16014:71: warning: the variable "self" was not declared in anonymous function
" 372#"
...undefined' && globalThis || typeof self !== 'undefined' && self ||
                                      ^~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:26274:27: warning: the variable "performance" was not declared in anonymous function " 685#"
  if ("object" === typeof performance && "function" === typeof performance.no...
                          ^~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:26297:26: warning: the variable "navigator" was not declared in anonymous function " 685#"
  "undefined" !== typeof navigator && undefined !== navigator.scheduling && u...
                         ^~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:26407:37: warning: the variable "MessageChannel" was not declared in anonymous function " 685#"
  };else if ("undefined" !== typeof MessageChannel) {
                                    ^~~~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:26422:34: warning: the variable "nativeRuntimeScheduler" was not declared in anonymous function " 685#"
... = "undefined" !== typeof nativeRuntimeScheduler ? nativeRuntimeScheduler....
                             ^~~~~~~~~~~~~~~~~~~~~~
android\app\build\generated\assets\createBundleReleaseJsAndAssets\index.android.bundle:35520:34: warning: the variable "requestAnimationFrame" was not declared in function "start 9#"
...    this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));
                              ^~~~~~~~~~~~~~~~~~~~~
```


### Reproducer

.

### Screenshots and Videos

![image](https://github.com/user-attachments/assets/2ed39885-e4e5-4d5c-b0bb-d4ba76e52668)