Android 13下Flutter Firebase Dynamic Links遇ActivityNotFoundException问题
Flutter集成Firebase Dynamic Links在Android 13上的ActivityNotFoundException问题
仅在Android 13版本运行应用时出现如下错误,Android 13以下版本均正常:
Activity not found to handle Intent action [CONTEXT service_id=77 ] android.content.ActivityNotFoundException: Unable to find explicit activity class {com.foo.bar/com.foo.bar.MainActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>?
由于Android 13对intent的处理更加严格,怀疑是配置有误但始终无法定位。已联系Firebase支持,对方表示该问题超出其支持范围,希望有人能指出配置错误之处。
使用的链接:
https://foobar.page.link/?link=https://foo-bar-a5111.firebaseapp.com/__/auth/action?apiKey%3DAIzaSyDHlkdWSvP0RLERv3dYszCB6rJG66CL49c%26mode%3DsignIn%26oobCode%3Di9r0XZY8GjHNlvZbEeoAwhGkPCpwsT_m43AIt-gFnDIAAAGGgGtBOQ%26continueUrl%3Dhttps://foo.bar/registration_email_verification?id%253D123%26lang%3Den&apn=com.foo.bar&amv&afl=https://foo-bar-a5111.firebaseapp.com/__/auth/action?apiKey%3DYIzaSyDXlkdWSvP8RLERv3dYszCB6rJ666CL49c%26mode%3DsignIn%26oobCode%3Di9r0XZY8GjHNlvZbEeoAwhGkPCpwsT_m43AIt-gFnDIAAAGGgGtBOQ%26continueUrl%3Dhttps://foo.bar/registration_email_verification?id%253D123%26lang%3Den
APK中的AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0.0" android:compileSdkVersion="33" android:compileSdkVersionCodename="13" package="com.foo.bar" platformBuildVersionCode="33" platformBuildVersionName="13"> <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="33" /> ... <application android:label="fdl_issue" android:icon="@ref/0x7f080000" android:name="android.app.Application" android:debuggable="true" android:appComponentFactory="androidx.core.app.CoreComponentFactory"> <activity android:theme="@ref/0x7f0b0000" android:name="com.foo.bar.MainActivity" android:exported="true" android:launchMode="1" android:configChanges="0x40003fb4" android:windowSoftInputMode="0x10" android:hardwareAccelerated="true"> ... <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="https" android:host="foo.bar" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> ... </application> ... </manifest>
/android/app/src/main/kotlin/com/foo/bar/MainActivity.kt:
package com.foo.bar import io.flutter.embedding.android.FlutterActivity class MainActivity: FlutterActivity() { }
内容的提问来源于stack exchange,提问作者Jop Middelkamp
相关产品推荐
相关产品推荐

