编辑:这是清单合并中的一个错误(缺少功能?)。它适用于 Android Studio 3.5 Canary 5 及更高版本。所以想要做的是为<deepLink />
每个 uri 添加一个。在我的情况下是
<deepLink
android:id="@+id/deepLink"
app:uri="https://www.example.com/foo?cn={cardNumber}&bd={birthDate}"/>
<deepLink
android:id="@+id/deepLink2"
app:uri="https://www.example.com/foo?cn={cardNumber}"/>
我在表格中有一个深层链接"https://www.example.com/foo?cn=L349DA&bd=1982-03-12"
我在我的导航图中解析它
<deepLink
android:id="@+id/deepLink"
app:uri="https://www.example.com/foo?cn={cardNumber}&bd={birthDate}"/>
这一切都很好。但是我的参数bd
是可选的,所以我不能保证它会包含在 url 中。我们如何处理这种情况?
我试过*
在参数上使用通配符,但没有成功。而且我尝试添加两个<deepLink .../>
元素,但这会产生Manifest merger failed: Multiple destinations...
错误。
提前致谢!