英文:
firebase dynamic link causes ActivityNotFoundException on targetSdk 33
问题
以下是翻译的内容,其中包括了代码部分:
"Has anyone faced this issue? When I build the app on targetSdk 33
, app wont open dynamic link which crashes on ActivityNotFoundException
on my pixel 6
android 13
."
"有没有人遇到这个问题?当我在targetSdk 33
上构建应用程序时,应用程序无法打开动态链接,导致在我的pixel 6
上的android 13
上发生ActivityNotFoundException
崩溃。"
"Build setup causing crash:"
"导致崩溃的构建设置:"
"compileSdk = 33"
"targetSdk = 33"
"minSdk = 23"
"buildTools = "33.0.1""
"logcat crash:"
"logcat 崩溃日志:"
"Activity not found to handle Intent action [CONTEXT service_id=77 ]"
"android.content.ActivityNotFoundException: Unable to find explicit activity class {com.somecompany.app/com.somecompany.app.MainActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>?"
"找不到处理意图动作的活动:[CONTEXT service_id=77]"
"android.content.ActivityNotFoundException:找不到显式活动类{com.somecompany.app/com.somecompany.app.MainActivity};您是否在AndroidManifest.xml中声明了此活动,或者您的意图是否与其声明的<intent-filter>不匹配?"
"workaroud build setup which works normally:"
"正常工作的解决方案构建设置:"
"compileSdk = 33"
"targetSdk = 32"
"minSdk = 23"
"buildTools = "33.0.1""
"Just in case i will add my intent filter:"
"以防万一,我会添加我的意图过滤器:"
"
"
"
"
"<data android:host="mydomain.page.link""
android:pathPrefix="/link""
android:scheme="http"/>"
"<data android:host="mydomain.page.link""
android:pathPrefix="/link""
android:scheme="https"/>"
""
"Any suggestion fix for targetSdk 33?"
"有关targetSdk 33
的修复建议吗?"
英文:
Has anyone faced this issue? When I build the app on targetSdk 33
, app wont open dynamic link which crashes on ActivityNotFoundException
on my pixel 6
android 13
.
Build setup causing crash:
compileSdk = 33
targetSdk = 33
minSdk = 23
buildTools = "33.0.1"
logcat crash:
Activity not found to handle Intent action [CONTEXT service_id=77 ]
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.somecompany.app/com.somecompany.app.MainActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2197)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1839)
at android.app.Activity.startActivityForResult(Activity.java:5471)
at hcl.platform_startActivityForResult(:com.google.android.gms@230313044@23.03.13 (190400-503260631):2)
at hck.startActivityForResult(:com.google.android.gms@230313044@23.03.13 (190400-503260631):2)
at com.google.android.chimera.android.Activity.startActivityForResult(:com.google.android.gms@230313044@23.03.13 (190400-503260631):2)
at hgw.startActivityForResult(:com.google.android.gms@230313044@23.03.13 (190400-503260631):2)
at hck.public_startActivityForResult(:com.google.android.gms@230313044@23.03.13 (190400-503260631):2)
at hcl.startActivityForResult(:com.google.android.gms@230313044@23.03.13 (190400-503260631):3)
at android.app.Activity.startActivityForResult(Activity.java:5429)
at hcl.platform_startActivityForResult(:com.google.android.gms@230313044@23.03.13 (190400-503260631):1)
at hck.startActivityForResult(:com.google.android.gms@230313044@23.03.13 (190400-503260631):1)
at com.google.android.chimera.android.Activity.startActivityForResult(:com.google.android.gms@230313044@23.03.13 (190400-503260631):1)
at hgw.startActivityForResult(:com.google.android.gms@230313044@23.03.13 (190400-503260631):1)
at hck.public_startActivityForResult(:com.google.android.gms@230313044@23.03.13 (190400-503260631):1)
at hcl.startActivityForResult(:com.google.android.gms@230313044@23.03.13 (190400-503260631):1)
at android.app.Activity.startActivity(Activity.java:5927)
at hcl.platform_startActivity(:com.google.android.gms@230313044@23.03.13 (190400-503260631):2)
at hck.startActivity(:com.google.android.gms@230313044@23.03.13 (190400-503260631):2)
at com.google.android.chimera.android.Activity.startActivity(:com.google.android.gms@230313044@23.03.13 (190400-503260631):2)
at hck.public_startActivity(:com.google.android.gms@230313044@23.03.13 (190400-503260631):2)
at hcl.startActivity(:com.google.android.gms@230313044@23.03.13 (190400-503260631):3)
at android.app.Activity.startActivity(Activity.java:5894)
at hcl.platform_startActivity(:com.google.android.gms@230313044@23.03.13 (190400-503260631):1)
at hck.startActivity(:com.google.android.gms@230313044@23.03.13 (190400-503260631):1)
at com.google.android.chimera.android.Activity.startActivity(:com.google.android.gms@230313044@23.03.13 (190400-503260631):1)
at kmq.x(:com.google.android.gms@230313044@23.03.13 (190400-503260631):4)
at kmr.onPostExecute(:com.google.android.gms@230313044@23.03.13 (190400-503260631):3)
at android.os.AsyncTask.finish(AsyncTask.java:771)
at android.os.AsyncTask.-$$Nest$mfinish(Unknown Source:0)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
workaroud build setup which works normally:
compileSdk = 33
targetSdk = 32
minSdk = 23
buildTools = "33.0.1"
Just in case i will add my intent filter:
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:host="mydomain.page.link"
android:pathPrefix="/link"
android:scheme="http"/>
<data android:host="mydomain.page.link"
android:pathPrefix="/link"
android:scheme="https"/>
</intent-filter>
Any suggestion fix for targetSdk 33?
答案1
得分: 1
你有两个选项来设置sdk = 32,或者将所有子域添加到你的意图过滤器中https://github.com/firebase/firebase-android-sdk/issues/4198#issuecomment-1278762724
英文:
You have two options to set sdk = 32
or add all subdomains to your intent filter
https://github.com/firebase/firebase-android-sdk/issues/4198#issuecomment-1278762724
答案2
得分: -1
在清单文件中添加 android:autoVerify="true" 到意图过滤器中:
<intent-filter android:autoVerify="true">
英文:
add android:autoVerify="true" in intent filter menifest file
<intent-filter android:autoVerify="true">
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论