После установки 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 эмулятор ?? отображается другой URL-адрес, такой как https://stackoverflow.com/
, и веб-представление работает, но не может отображаться 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.