Expo中Deep Link仅打开应用却无法跳转指定路由求助
Expo 文件路由与Deep Link故障排查问题
我正在使用Expo的文件路由和Deep Link功能,此前功能正常,但近期出现故障,无法定位原因。
文件结构
├── MobileApp │ ├── app │ │ ├── (auth) | │ │ ├── (tabs) | | │ │ ├── profile | | │ │ └── search │ │ │ ├── screens │ │ │ │ ├── rooms │ │ │ │ │ └── [id].tsx │ │ │ │ ├── sessions │ │ │ │ │ └── [id].tsx │ │ │ │ ├── hosts │ │ │ │ │ └── [id].tsx │ │ │ └── _layout.tsx
Deep Link格式
myapp://screens/rooms/03131-31231-12313
根据官方文档该格式应正常工作,且应用内通过按钮跳转此路由可正常执行,但外部打开时出现以下问题:
- 应用已打开时:点击Deep Link仅唤起应用,不跳转指定路由,同时收到警告:
Navigation state parsed from the URL contains route not present in the root navigator - 应用关闭时:点击Deep Link后短暂显示正确页面,随后立即跳回起始页面
已尝试的解决方法
- 尝试使用
uri-scheme工具,但提示无法找到adb - 测试多种Deep Link格式组合(如三斜杠、包含
(auth)/screens路径、非动态路由等) - 多次重建应用
以上操作均未解决问题。
内容的提问来源于stack exchange,提问作者Macio33
相关产品推荐
相关产品推荐

