未生成 Hermes 源图以进行本机反应

BIl*_*omo 6 android reactjs react-native

我正在使用 Windows 11 并尝试在使用命令进行调试时生成 React Native TypeScript SourceMapyarn create-env --staging && react-native run-android --variant=stagingDebug --appIdSuffix=staging

我希望在 处生成打字稿源映射android/app/build/sourcemap,但该文件夹不存在。我在https://reactnative.dev/docs/next/sourcemaps#:~:text=Source%20maps%20are%20disabled%20by,React%20Native%20code%20and%20images%22.&text=sh-上有以下文档,如果%20done%20正确%20%2D%20you%20may%20see%20的%20output%20location%20,map%20期间%20Metro%20build%20output

将 build.gradle 更新为android/app/build.gradle如下值

project.ext.react = [
    enableHermes: true,  // clean and rebuild if changing
    bundleInStaging: true,  
    bundleInRelease: true,
    hermesFlagsRelease: ["-O", "-output-source-map"],
    hermesFlagsDebug: ["-O", "-output-source-map"],
    // entryFile: "index.js",
    // bundleInPre: true
]
Run Code Online (Sandbox Code Playgroud)

但仍然没有作品。