webview_flutter只是在android模拟器中显示空白屏幕

时间:2020-04-07 08:21:48

标签: flutter webview

在我的奉承项目中安装 webview_flutter 0.3.19 + 9 库之后,我想使用它,以便编写这些代码:

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

class ConfigWebViewScreen extends StatelessWidget {
  ConfigWebViewScreen(this._result);
  final dynamic _result;
  Completer<WebViewController> _controller = Completer<WebViewController>();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: WebView(
          initialUrl: "https://mc.iotel.ir/",
          javascriptMode: JavascriptMode.unrestricted,
          onWebViewCreated: (WebViewController webViewController) {
            _controller.complete(webViewController);
          },
        ),
      ),
    );
  }
}

但是我的Android模拟器上显示了?? 显示了其他网址,例如https://stackoverflow.com/,并且可以使用webView,但无法显示https://mc.iotel.ir/吗?

这是在调试控制台中打印的:

D/EGL_emulation( 7360): eglMakeCurrent: 0xef2d8b80: ver 2 0 (tinfo 0xe7779aa0)
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 2 (2) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 13 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/HostConnection( 7360): HostConnection::get() New Host Connection established 0xcfd0a4c0, tid 7648
D/HostConnection( 7360): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_2
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation( 7360): eglCreateContext: 0xd25680e0: maj 2 min 0 rcv 2
D/EGL_emulation( 7360): eglMakeCurrent: 0xd25680e0: ver 2 0 (tinfo 0xc2c9fc80)
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 1 (1) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 2 (2) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 1 (1) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
I/flutter ( 7360): Instance of 'CatalogsWithProductModel'
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
I/flutter ( 7360): Instance of 'CatalogsWithProductModel'
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 2 (2) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation( 7360): eglMakeCurrent: 0xef2d8b80: ver 2 0 (tinfo 0xe7779aa0)
E/BufferQueueProducer( 7360): [SurfaceTexture-0-7360-1] cancelBuffer: BufferQueue has been abandoned
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 2 (2) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 7360): glUtilsParamSize: unknow param 0x000085b5
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation( 7360): eglMakeCurrent: 0xd25680e0: ver 2 0 (tinfo 0xc2c9fc80)
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 1 (1) 0 0
D/eglCodecCommon( 7360): setVertexArrayObject: set vao to 0 (0) 0 0

在模拟器中,只显示白屏!

 flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Linux, locale en_US.UTF-8)

[!] Android toolchain - develop for Android devices (Android SDK version
    29.0.3)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor
      --android-licenses
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.43.2)
[✓] Connected device (1 available)

! Doctor found issues in 1 category.

*****编辑******* 当我好好看一下控制台时,我看到了此错误:

I/X509Util(27608): Failed to validate the certificate chain, error: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

0 个答案:

没有答案
相关问题