Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
techmaved opened this issue May 10, 2024 · 0 comments
Open

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

techmaved opened this issue May 10, 2024 · 0 comments

Comments

@techmaved
Copy link

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)
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant