Android 13设备中Firebase DeepLink无法正常工作的问题求助
Firebase DeepLink在Android 13设备无法跳转的排查与解决
关键错误分析
从日志中可定位核心问题:
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.lulu.luluone/com.luluone.lite.feature.splash.SplashActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>?
系统无法找到指定的SplashActivity,结合Android 13的行为变化,重点排查Manifest配置、权限适配及Firebase配置。
具体解决步骤
1. 修正AndroidManifest.xml中Activity的声明
Android 13(API 33+)对外部可访问的Activity有强制要求:
- 必须为处理外部Intent的Activity显式设置
android:exported="true",否则系统会拒绝访问 - 确认
SplashActivity的全类名与Manifest中android:name完全匹配(日志中类路径为com.luluone.lite.feature.splash.SplashActivity,需对应到Manifest声明)
示例正确配置:
<activity android:name="com.luluone.lite.feature.splash.SplashActivity" android:exported="true" android:launchMode="singleTop"> <!-- DeepLink对应的Intent Filter --> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <!-- 匹配你的DeepLink规则 --> <data android:scheme="https" android:host="jkg2x.app.goo.gl" android:pathPrefix="/lulumoney" /> </intent-filter> </activity>
2. 验证Firebase Dynamic Links配置
- 检查Firebase控制台中,该DeepLink关联的应用包名、签名证书是否与Android 13设备上安装的应用完全一致
- 测试直接使用原始链接(而非短链)是否能唤起应用,排除短链跳转的中间环节问题
3. 用adb命令验证Intent匹配
执行以下命令快速定位问题:
adb shell am start -a android.intent.action.VIEW -d "https://jkg2x.app.goo.gl/lulumoney" com.lulu.luluone
- 若命令执行失败:说明是Manifest配置或Activity类路径的问题
- 若命令执行成功:说明Firebase SDK可能存在适配问题,需升级到最新版本的Firebase Dynamic Links SDK
4. 排查混淆与模块依赖问题
- 若
SplashActivity位于独立模块中,确认该模块已正确依赖到主应用模块 - 在混淆规则中添加保护,避免Activity被混淆:
-keep class com.luluone.lite.feature.splash.SplashActivity { *; }
内容的提问来源于stack exchange,提问作者Abin Koshy Cheriyan
相关产品推荐
相关产品推荐

