不变违规:requireNativeComponent:在 UImanager 中找不到“VRTText”

问题描述 投票:0回答:2

我正在与 [email protected] [email protected] 一起构建 AR 应用程序。我按照文档 Viro-Quick-Start-Windows 中的步骤操作,当我尝试捆绑和构建应用程序时,它显示此错误。我还提到了 Viromedia/viro 但它不起作用。

当我启动应用程序时,这是我看到的屏幕

当我在所需的体验中选择 AR 时,它会显示以下错误消息

react-native augmented-reality viro-react
2个回答
1
投票

我按照以下步骤修复了此错误

  • 转到:node_modules/metro-config/src/defaults/backlist.js 并替换

共享黑名单

这样:

var sharedBlacklist = [
  /node_modules[\/\\]react[\/\\]dist[\/\\].*/,
  /website\/node_modules\/.*/,
  /heapCapture\/bundle\.js/,
  /.*\/__tests__\/.*/
];

打开终端并运行:

react-native start
  • 等待依赖图加载,

再打开一个终端并运行:

react-native run-android --variant=gvrDebug

0
投票

我在 Viro starter-kit 存储库中遇到了同样的 问题。这是我的解决方案https://github.com/viromedia/viro/issues/748#issuecomment-1933535988

© www.soinside.com 2019 - 2024. All rights reserved.