Skip to content

Changed function signiture in androidx.activity:activity-composeΒ #338

@techmaved

Description

@techmaved

Describe the bug
The onNewIntent method on AbstractSpotifyPkceLoginActivity allows a nullable intent.

To Reproduce
Steps to reproduce the behavior:

  1. update androidx.activity:activity-compose to version 1.9.0 from 1.8.2
  2. build android project
  3. See error
Inherited platform declarations clash: The following declarations have the same JVM signature (onNewIntent(Landroid/content/Intent;)V):

 fun onNewIntent(intent: Intent):
 fun onNewIntent(intent: Intent?):

Expected behavior
Android project builds

Additional context
This failing build is related to the new source of ComponentActivity in androidx.activity:activity-compose
See 1.8.2

@CallSuper
    @Override
    protected void onNewIntent(
            @SuppressLint({"UnknownNullness", "MissingNullability"}) Intent intent
    ) {
        super.onNewIntent(intent);
        for (Consumer<Intent> listener : mOnNewIntentListeners) {
            listener.accept(intent);
        }
    }

See 1.9.0

@CallSuper
    override fun onNewIntent(
        @Suppress("InvalidNullabilityOverride")
        intent: Intent
    ) {
        super.onNewIntent(intent)
        for (listener in onNewIntentListeners) {
            listener.accept(intent)
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions