Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[ Tool ] Report Android x86 target devices as unsupported #170282

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

bkonyi
Copy link
Contributor

@bkonyi bkonyi commented Jun 9, 2025

No description provided.

@github-actions github-actions bot added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. a: desktop Running on desktop team-ios Owned by iOS platform team labels Jun 9, 2025
@bkonyi
Copy link
Contributor Author

bkonyi commented Jun 9, 2025

@jmagman does this look like roughly the right thing to do? Adding TargetPlatform.android_x86 back would mean we need to update every switch statement on a TargetPlatform to handle a case that should never happen.

@bkonyi bkonyi requested a review from jmagman June 12, 2025 16:45
@bkonyi bkonyi marked this pull request as ready for review June 12, 2025 16:45
@bkonyi bkonyi requested a review from a team as a code owner June 12, 2025 16:45
@bkonyi bkonyi requested a review from matanlurey June 13, 2025 18:13
case 'x86_64':
return TargetPlatform.android_x64;
default:
return TargetPlatform.android_arm;
throw UnsupportedError('Unsupported Android architecture: $abi');
Copy link
Contributor

Choose a reason for hiding this comment

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

This API seems weird - it never could throw before, and UnsupportedError shouldn't be caught.

I would expect this to either return null, or to return TargetPlatform.unsupported or keep returning android_arm and use that a signal for "not supported" below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Keeping and returning android_arm means we need to keep handling that case in every switch on TargetPlatform throughout the tool, so I'd really like to avoid doing that.

TargetPlatform.unsupported might be an idea... let me try some things out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: desktop Running on desktop platform-ios iOS applications specifically team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants