skip to Main Content

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@[email protected] (190400-503260631):2)
        at hck.startActivityForResult(:com.google.android.gms@[email protected] (190400-503260631):2)
        at com.google.android.chimera.android.Activity.startActivityForResult(:com.google.android.gms@[email protected] (190400-503260631):2)
        at hgw.startActivityForResult(:com.google.android.gms@[email protected] (190400-503260631):2)
        at hck.public_startActivityForResult(:com.google.android.gms@[email protected] (190400-503260631):2)
        at hcl.startActivityForResult(:com.google.android.gms@[email protected] (190400-503260631):3)
        at android.app.Activity.startActivityForResult(Activity.java:5429)
        at hcl.platform_startActivityForResult(:com.google.android.gms@[email protected] (190400-503260631):1)
        at hck.startActivityForResult(:com.google.android.gms@[email protected] (190400-503260631):1)
        at com.google.android.chimera.android.Activity.startActivityForResult(:com.google.android.gms@[email protected] (190400-503260631):1)
        at hgw.startActivityForResult(:com.google.android.gms@[email protected] (190400-503260631):1)
        at hck.public_startActivityForResult(:com.google.android.gms@[email protected] (190400-503260631):1)
        at hcl.startActivityForResult(:com.google.android.gms@[email protected] (190400-503260631):1)
        at android.app.Activity.startActivity(Activity.java:5927)
        at hcl.platform_startActivity(:com.google.android.gms@[email protected] (190400-503260631):2)
        at hck.startActivity(:com.google.android.gms@[email protected] (190400-503260631):2)
        at com.google.android.chimera.android.Activity.startActivity(:com.google.android.gms@[email protected] (190400-503260631):2)
        at hck.public_startActivity(:com.google.android.gms@[email protected] (190400-503260631):2)
        at hcl.startActivity(:com.google.android.gms@[email protected] (190400-503260631):3)
        at android.app.Activity.startActivity(Activity.java:5894)
        at hcl.platform_startActivity(:com.google.android.gms@[email protected] (190400-503260631):1)
        at hck.startActivity(:com.google.android.gms@[email protected] (190400-503260631):1)
        at com.google.android.chimera.android.Activity.startActivity(:com.google.android.gms@[email protected] (190400-503260631):1)
        at kmq.x(:com.google.android.gms@[email protected] (190400-503260631):4)
        at kmr.onPostExecute(:com.google.android.gms@[email protected] (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?

2

Answers


  1. add android:autoVerify="true" in intent filter menifest file

    <intent-filter android:autoVerify="true">
    
    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search