You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

应用DeepLinking问题:点击链接时应用重复显示且一个无法正常工作

Hey there! Let's dig into this duplicate app listing issue with deep linking—it’s such a headache when you tap a link and see your app twice, especially when one doesn’t even work. Here are the most likely causes and fixes to try out:

常见原因及解决建议

1. 重复的Intent Filter配置

The most common culprit is multiple identical (or overlapping) <intent-filter> entries in your AndroidManifest.xml targeting the same deep link. The system treats each valid filter as a separate app entry, hence the duplicate listing.

  • How to check: Open Android Studio, locate your AndroidManifest.xml, right-click it and select Merged Manifest (this shows the final combined config, including entries added by third-party libraries). Search for your deep link's scheme (e.g., android:scheme="myapp") to count how many <intent-filter> blocks include this setup.
  • Fix: Delete redundant filters, leaving only the one pointing to your correct deep link-handling Activity. If a third-party library added the duplicate, use tools:node="remove" to strip it out:
<!-- Add this to your Manifest to remove the duplicate filter from third-party code -->
<intent-filter tools:node="remove">
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:scheme="myapp" /> <!-- Replace with your actual scheme -->
</intent-filter>

2. Linked to a deprecated/non-functional Activity

If one duplicate entry points to an abandoned or improperly configured Activity, that’s why one option works and the other doesn’t.

  • How to check: In the Merged Manifest, look at which Activity each duplicate filter is tied to. Confirm which Activity is your current, valid deep link handler.
  • Fix: Remove the filter linked to the deprecated Activity. Also ensure your target Activity has code to process the deep link intent:
override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    intent?.data?.let { uri ->
        // Handle deep link logic here (e.g., navigate to the correct screen)
    }
}

If you enabled android:autoVerify="true" for App Links but the verification failed (e.g., incorrect assetlinks.json deployment), the system may show both an App Links entry and a regular deep link entry—creating the appearance of duplicates.

  • How to check: Verify that your domain hosts a valid assetlinks.json file with matching package name and signature fingerprint for your app.
  • Fix: Either fix the assetlinks.json to pass verification, or remove android:autoVerify="true" temporarily to switch back to regular deep linking mode.

4. Stale system cache

Sometimes the system caches old app intent configurations, even after you’ve updated your Manifest.

  • Fix: Fully uninstall the app and reinstall it, or go to system settings → Apps → Your App → Clear default opening preferences, then test the link again.

内容的提问来源于stack exchange,提问作者user2951

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 08:48:05