react-navigation / react-navigation/react-navigation.github.io

Use Deep Link, occur error

未关闭
#1,276 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
JavaScript
星标
324
派生
2k
PR 合并指标
30 天内没有已合并 PR

描述

I'm using Deep link refer to doc: https://reactnavigation.org/docs/deep-linking#setup-with-expo-projects.

  • Install dependencies:
{
  "dependencies": {
       "expo": "^49.0.13",
       "expo-linking": "~5.0.2"
   }
}
  • Configure my app.json
{
  "name": "ReactNativeDemo",
  "displayName": "ReactNativeDemo",
  "expo": {
    "scheme": "mychat"
  }
}
  • import and use Deep Link
import * as Linking from 'expo-linking'

// the following code caused an error to occur
const prefix = Linking.createURL('/')

function App() {
  const linking = {
    prefixes: [prefix]
  }

  return (
    <NavigationContainer linking={linking} fallback={<Text>Loading...</Text>}>
      {/* content */}
    </NavigationContainer>
  )
}
  • error message in my ternimal, but compiler is successfull, error occur only running app in ios simulator
Error: expo-linking needs access to the expo-constants manifest (app.json or app.config.js) to determine what URI scheme to use. Setup the manifest and rebuild: https://github.com/expo/expo/blob/main/packages/expo-constants/README.md, js engine: hermes

How should I solve this error???

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从报告中链接的深度链接文档开始,将其中的 Expo 设置与所示的 app.json、expo-linking 和 NavigationContainer 用法进行比较。使用提供的示例在 iOS 模拟器中重现该错误,然后确定文档是否需要对 manifest 和重新构建要求进行说明。完成的标准是:文档中的设置能够解决此运行时错误,或清楚说明所需的配置。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, react-native
领域
documentation
Issue 类型
文档
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。