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

Wrong screen resolution #200

Closed
martinhaintz opened this issue Nov 7, 2021 · 1 comment
Closed

Wrong screen resolution #200

martinhaintz opened this issue Nov 7, 2021 · 1 comment

Comments

@martinhaintz
Copy link

Hi,

I am creating screenshots with flutter drive, but no matter which device I choose, the height of the images is never correct.

For Nexus 5X the resolution is 1080 x 1794 and should be 1080 x 1920.
For Pixel the resolution is 1080 x 1776 and should be 1080 x 1920.
For Pixel XL the resolution is 1440 x 2392 and should be 1440 x 2560.

Emulator:

- name: run emulator
   uses: reactivecircus/android-emulator-runner@v2
   with:
     api-level: 28
     profile: pixel
     force-avd-creation: false
     emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
     disable-animations: true

If I run flutter drive locally with the emulator the resolution for pixel 2 or nexus 5x is correct 1080 x 1920.

I want to use the screenshots later in fastlane frameit and always receive the error Unsupported screen size [1080, 1776] for path './screenshot.png'

What am I doing wrong?

Thanks in advance!

@mrk-han
Copy link
Collaborator

mrk-han commented Oct 20, 2022

There used to be a flag you could pass e.g. emulator -skin 1080x1920 but it is now deprecated. I'm not sure what replaced it but you can check out this snippet for altering resolution / density in the config.ini file after emulator creation.

@mrk-han mrk-han closed this as completed Oct 20, 2022
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

2 participants