android
runtime_error
ai_generated
true
java.lang.IllegalArgumentException: Navigation destination cannot be found for deep link: https://example.com/path
ID: android/navigation-unknown-deeplink-host
87%Fix Rate
84%Confidence
1Evidence
2023-11-20First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| Navigation 2.6.0 | active | — | — | — |
| Navigation 2.7.0 | active | — | — | — |
| Android 12 | active | — | — | — |
| Android 13 | active | — | — | — |
Root Cause
Navigation component cannot match a deep link URI to any registered destination in the NavGraph due to missing or malformed deep link declaration.
generic中文
导航组件无法将深度链接 URI 匹配到 NavGraph 中任何已注册的目标,因为深度链接声明缺失或格式错误。
Official Documentation
https://developer.android.com/guide/navigation/navigation-deep-linkWorkarounds
-
90% success Add a `<deepLink app:uri="https://example.com/path" />` element inside the corresponding `<fragment>` or `<activity>` in your nav_graph.xml file.
Add a `<deepLink app:uri="https://example.com/path" />` element inside the corresponding `<fragment>` or `<activity>` in your nav_graph.xml file.
-
85% success Verify the deep link URI pattern matches exactly, including path and query parameters. For dynamic paths, use placeholders like `{id}` in the URI.
Verify the deep link URI pattern matches exactly, including path and query parameters. For dynamic paths, use placeholders like `{id}` in the URI.
中文步骤
Add a `<deepLink app:uri="https://example.com/path" />` element inside the corresponding `<fragment>` or `<activity>` in your nav_graph.xml file.
Verify the deep link URI pattern matches exactly, including path and query parameters. For dynamic paths, use placeholders like `{id}` in the URI.
Dead Ends
Common approaches that don't work:
-
80% fail
Adding `<intent-filter>` in AndroidManifest.xml for the activity without corresponding <deepLink> in NavGraph causes mismatch.
-
90% fail
Hardcoding the deep link URI in code without registering it in the NavGraph XML leads to the same error.
-
70% fail
Using `app:uri` with incorrect scheme (e.g., 'http' instead of 'https') causes no match.