Skip to content

fix: add Exported = true to MainActivity to fix Android TV build failure (XAAMM0000) - #2199

Merged
MartinZikmund merged 2 commits into
mainfrom
copilot/fix-android-exported-error
Aug 8, 2026
Merged

MartinZikmund merged 2 commits into
mainfrom
copilot/fix-android-exported-error

Conversation

Copilot AI commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

When the Android TV feature is enabled, MainActivity gains an explicit [IntentFilter]. The .NET Android tooling only auto-injects android:exported="true" when it synthesizes the launcher intent-filter itself; with an explicit [IntentFilter], the attribute is absent, and the manifest merger rejects it on targetSdkVersion >= 31.

PR Type

  • Bugfix

What is the current behavior?

dotnet build on an Android TV–enabled project fails at the manifest merge step:

error XAAMM0000: android:exported needs to be explicitly specified for element
<activity#...MainActivity> when the corresponding component has an intent filter defined.

What is the new behavior?

Exported = true is set on [Activity], ensuring android:exported="true" is always emitted regardless of which [IntentFilter] blocks are present:

[Activity(
    MainLauncher = true,
    ConfigurationChanges = global::Uno.UI.ActivityHelper.AllConfigChanges,
    WindowSoftInputMode = SoftInput.AdjustNothing | SoftInput.StateHidden,
    Exported = true          // <-- added
)]
#if useAndroidTV
[IntentFilter(...)]
#endif

PR Checklist

  • Associated with an issue (GitHub or internal)

Other information

Internal Issue (If applicable):

  • Fixes #23989

Copilot AI lite review requested due to automatic review settings August 6, 2026 15:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings August 6, 2026 16:00
Copilot AI changed the title [WIP] Fix Android build failure due to missing android:exported fix: add Exported = true to MainActivity to fix Android TV build failure (XAAMM0000) Aug 6, 2026
Copilot AI requested a review from MartinZikmund August 6, 2026 16:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@MartinZikmund
MartinZikmund marked this pull request as ready for review August 7, 2026 08:04
@mergify

mergify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@MartinZikmund
MartinZikmund merged commit d59808c into main Aug 8, 2026
85 of 87 checks passed
@MartinZikmund
MartinZikmund deleted the copilot/fix-android-exported-error branch August 8, 2026 09:12
@kazo0

kazo0 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@Mergifyio backport release/stable/6.7

@mergify

mergify Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

backport release/stable/6.7

✅ Backports have been created

Details

This was referenced Nov 16, 2026
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

Successfully merging this pull request may close these issues.

Android build fails with XAAMM0000 (android:exported missing on MainActivity) when the Android TV feature is enabled

5 participants