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

Issue with virtual display size , It says created display size is larger than device screen size. #5

Closed
prabhunath111 opened this issue Dec 18, 2019 · 18 comments

Comments

@prabhunath111
Copy link

Below error i am getting...

Creating a virtual display of size: [1080, 2210] may result in problems(flutter/flutter#2897 is larger than the device screen size: [1080, 2131]

@Dammyololade
Copy link
Owner

Hello, has this been resolved now?

@routsrv
Copy link

routsrv commented Mar 4, 2020

Hello, I'm getting the same error.
Does anyone have idea how to fix it?

@prabhunath111
Copy link
Author

Hello, I'm getting the same error.
Does anyone have idea how to fix it?

You can resolve this by write example app code in your project after installation
this plugin...

@prabhunath111
Copy link
Author

Hello, has this been resolved now?

I found another way and it's working...

@routsrv
Copy link

routsrv commented Mar 4, 2020

@prabhunath111 Can you please explain how you fix it? Also getting more bottom margin in ios.
Thank you

@routsrv
Copy link

routsrv commented Mar 6, 2020

@prabhunath111 Can you help with this?

@aboutmydreams
Copy link

same problem

@Dammyololade
Copy link
Owner

Hi can't seem to be able to reproduce this error, can you please share your sample usage or the output of flutter doctor

@RedCuckoo
Copy link

RedCuckoo commented May 8, 2020

@Dammyololade I am getting this error, while wrapping WebView into a SizedBox, which is wrapped into a ListView and setting bigger size than my physical device is.

It might seem to be a not very good structure, but I ended up with it trying to add pull to refresh gesture to the WebView (webview_flutter plugin).

Here is a simple snippet how to reproduce it:

@override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Flutter WebView example'),
      ),
      body: ListView(
      children:[SizedBox.fromSize(
        size:Size(100,1000),
        child: WebView(initialUrl: "https://flutter.dev/", javascriptMode: JavascriptMode.unrestricted,),
      ),]),
    );
flutter doctor -v [√] Flutter (Channel master, 1.18.0-14.0.pre.22, on Microsoft Windows [Version 10.0.18363.778], locale uk-UA) • Flutter version 1.18.0-14.0.pre.22 at C:\flutter • Framework revision 3519bec6c4 (10 hours ago), 2020-05-08 00:34:02 -0700 • Engine revision 3953c3ccd1 • Dart version 2.9.0 (build 2.9.0-5.0.dev 4da5b40fb6)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\momot\AppData\Local\Android\Sdk
• Platform android-29, build-tools 29.0.3
• ANDROID_HOME = C:\Users\momot\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
• All Android licenses accepted.

[√] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 45.1.1
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] IntelliJ IDEA Community Edition (version 2019.3)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.3
• Flutter plugin version 45.1.2
• Dart plugin version 193.5731

[!] VS Code, 64-bit edition (version 1.44.2)
• VS Code at C:\Program Files\Microsoft VS Code
X Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (1 available)
• Redmi Note 5 • 43150aa4 • android-arm64 • Android 9 (API 28)

! Doctor found issues in 1 category.

My flutter is on master.

console output
Performing hot restart...
Syncing files to device Redmi Note 5...
W/ContentCatcher(29517): Failed to notify a WebView
Restarted application in 4 545ms.
E/chromium(29517): [ERROR:aw_browser_terminator.cc(125)] Renderer process (31365) crash detected (code -1).
W/PlatformViewsController(29517): Creating a virtual display of size: [1080, 2750] may result in problems(https://github.com/flutter/flutter/issues/2897).It is larger than the device screen size: [1080, 2030].
D/EgretLoader(29517): EgretLoader(Context context)
D/EgretLoader(29517): The context is not activity
W/ContentCatcher(29517): Failed to notify a WebView
W/PlatformViewsController(29517): Creating a virtual display of size: [1080, 2750] may result in problems(https://github.com/flutter/flutter/issues/2897).It is larger than the device screen size: [1080, 2030].
W/ContentCatcher(29517): Failed to notify a WebView
W/ContentCatcher(29517): Failed to notify a WebView
V/AudioTrack(29517): getMinFrameCount=3844: afFrameCount=1920, afSampleRate=48000, afLatency=80
W/System  (29517): A resource failed to call release. 
V/AudioTrack(29517): getMinFrameCount=3844: afFrameCount=1920, afSampleRate=48000, afLatency=80
V/AudioTrack(29517): getMinFrameCount=3844: afFrameCount=1920, afSampleRate=48000, afLatency=80

@Dammyololade
Copy link
Owner

This issue has nothing to do with this plugin, kindly open an issue on flutter, thanks

@Masrafi
Copy link

Masrafi commented Dec 8, 2020

I want to show json pdf file. But it show that's kind of problem:

I/flutter ( 9329): tenderimage/Dec08/Dec08_Dhaka Navy-7A.pdf
W/PlatformViewsController( 9329): Creating a virtual display of size: [1440, 3500] may result in problems(flutter/flutter#2897 is larger than the device screen size: [1440, 2701].
D/com.shockwave.pdfium.PdfiumCore( 9329): Starting PdfiumAndroid 1.9.0
D/jniPdfium( 9329): Init FPDF library
D/jniPdfium( 9329): Destroy FPDF library

@deepak-0811
Copy link

deepak-0811 commented Feb 26, 2021

Same problem can anyone help me.

W/PlatformViewsController(26743): Creating a virtual display of size: [1080, 2210] may result in problems(flutter/flutter#2897 is larger than the device screen size: [1080, 2134].

@amitsingh6391
Copy link

W/PlatformViewsController( 2592): Creating a virtual display of size: [1575, 700] may result in problems(flutter/flutter#2897 is larger than the device screen size: [1440, 2392].
D/com.shockwave.pdfium.PdfiumCore( 2592): Starting PdfiumAndroid 1.9.0
D/jniPdfium( 2592): Init FPDF library
D/jniPdfium( 2592): Destroy FPDF library

@prabhunath111
Copy link
Author

@prabhunath111 Can you help with this?

Did you solve it?

@prabhunath111
Copy link
Author

Same problem can anyone help me.

W/PlatformViewsController(26743): Creating a virtual display of size: [1080, 2210] may result in problems(flutter/flutter#2897 is larger than the device screen size: [1080, 2134].

Did you solve it?

1 similar comment
@prabhunath111
Copy link
Author

Same problem can anyone help me.

W/PlatformViewsController(26743): Creating a virtual display of size: [1080, 2210] may result in problems(flutter/flutter#2897 is larger than the device screen size: [1080, 2134].

Did you solve it?

@surajsahani
Copy link

surajsahani commented May 5, 2021

use a placeholder with fixed height and width work for me

  PDF.network(
                      'https://google-developer-training.github.io/android-developer-fundamentals-course-concepts/en/android-developer-fundamentals-course-concepts-en.pdf',
                      height:  MediaQuery.of(context).size.height,

                      width: MediaQuery.of(context).size.width,
                      placeHolder: Image.asset("assets/images/pdf.png",
                          height: 200, width: 100),
                    )

@naseerx
Copy link

naseerx commented Jan 2, 2023

PlatformViewsController(30359): Creating a virtual display of size: [1080, 2400] may result in problems(flutter/flutter#2897 is larger than the device screen size:

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

10 participants