webview这插件现在用不了了还是打开的网址现在权限受限打不开了?

来源:12-10 基于自定义WebView实现H5混合开发-3【H5混合实战】

demonCry

2022-08-29

报错如下

I/WebViewFactory( 7291): Loading com.google.android.webview version 83.0.4103.106 (code 410410681)
I/hy.flutter_tri( 7291): The ClassLoaderContext is a special shared library.
D/nativeloader( 7291): classloader namespace configured for unbundled product apk. library_path=/product/app/WebViewGoogle/lib/x86:/product/app/WebViewGoogle/WebViewGoogle.apk!/lib/x86:/product/app/TrichromeLibrary/TrichromeLibrary.apk!/lib/x86:/product/lib:/system/product/lib
I/hy.flutter_tri( 7291): The ClassLoaderContext is a special shared library.
D/nativeloader( 7291): classloader namespace configured for unbundled product apk. library_path=/product/app/WebViewGoogle/lib/x86:/product/app/WebViewGoogle/WebViewGoogle.apk!/lib/x86:/product/app/TrichromeLibrary/TrichromeLibrary.apk!/lib/x86:/product/lib:/system/product/lib
I/cr_LibraryLoader( 7291): Loaded native library version number "83.0.4103.106"
I/cr_CachingUmaRecorder( 7291): Flushed 3 samples from 3 histograms.
I/TetheringManager( 7291): registerTetheringEventCallback:org.hy.flutter_trip
W/hy.flutter_tri( 7291): Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (greylist, reflection, allowed)
D/HostConnection( 7291): HostConnection::get() New Host Connection established 0xf6eeada0, tid 7400
W/cr_media( 7291): Requires BLUETOOTH permission
D/HostConnection( 7291): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2 
E/chromium( 7291): [ERROR:gl_surface_egl.cc(549)] eglChooseConfig failed with error EGL_SUCCESS
D/EGL_emulation( 7291): eglCreateContext: 0xf6eeb970: maj 2 min 0 rcv 2
D/EGL_emulation( 7291): eglMakeCurrent: 0xf6eeb970: ver 2 0 (tinfo 0xbc4707d0) (first time)
E/chromium( 7291): [ERROR:gl_surface_egl.cc(549)] eglChooseConfig failed with error EGL_SUCCESS
I/VideoCapabilities( 7291): Unsupported profile 4 for video/mp4v-es
W/cr_MediaCodecUtil( 7291): HW encoder for video/avc is not available on this device.
D/EGL_emulation( 7291): eglCreateContext: 0xf6eecee0: maj 2 min 0 rcv 2
I/chromium( 7291): [INFO:CONSOLE(1)] "mozilla/5.0 (linux; android 11; sdk_gphone_x86_arm build/rsr1.201013.001; wv) applewebkit/537.36 (khtml, like gecko) version/4.0 chrome/83.0.4103.106 mobile safari/537.36", source: https://webresource.c-ctrip.com/ares2/market/mixappBridge/1.1.14/default/bridge.js (1)
I/chromium( 7291): [INFO:CONSOLE(1)] "bridge.js start", source: https://webresource.c-ctrip.com/ares2/market/mixappBridge/1.1.14/default/bridge.js (1)
I/chromium( 7291): [INFO:CONSOLE(1)] "判断所处环境,isMiniProgram 返回值:  false", source: https://webresource.c-ctrip.com/ares2/market/mixappBridge/1.1.14/default/bridge.js (1)
I/chromium( 7291): [INFO:CONSOLE(11)] "将根据已有的meta标签来设置缩放比例", source: https://m.ctrip.com/webapp/you/gsdestination/static/resize.js (11)
E/cr_LocationProvider( 7291): Caught security exception while registering for location updates from the system. The application does not have sufficient geolocation permissions.
E/cr_LocationProvider( 7291): newErrorAvailable application does not have sufficient geolocation permissions.
E/cr_LocationProvider( 7291): Caught security exception while registering for location updates from the system. The application does not have sufficient geolocation permissions.
E/cr_LocationProvider( 7291): newErrorAvailable application does not have sufficient geolocation permissions.
E/cr_LocationProvider( 7291): Caught security exception while registering for location updates from the system. The application does not have sufficient geolocation permissions.
E/cr_LocationProvider( 7291): newErrorAvailable application does not have sufficient geolocation permissions.
E/chromium( 7291): [ERROR:address_tracker_linux.cc(245)] Could not send NETLINK request: Permission denied (13)
W/ThreadPoolForeg( 7291): type=1400 audit(0.0:404): avc: denied { nlmsg_readpriv } for scontext=u:r:untrusted_app:s0:c156,c256,c512,c768 tcontext=u:r:untrusted_app:s0:c156,c256,c512,c768 tclass=netlink_route_socket permissive=0 b/155595000 app=org.hy.flutter_trip
E/emuglGLESv2_enc( 7291): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetIntegerv:832 GL error 0x500
E/emuglGLESv2_enc( 7291): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetIntegerv:842 GL error 0x500
E/chromium( 7291): [ERROR:context_group.cc(181)] ContextResult::kFatalFailure: ES3 is blacklisted/disabled/unsupported by driver.
E/chromium( 7291): [ERROR:gles2_cmd_decoder.cc(2843)] [GroupMarkerNotSet(crbug.com/242999)!:0CBEF4F6]GL ERROR :GL_INVALID_ENUM : BackFramebuffer::Create: <- error from previous GL command
I/chromium( 7291): [INFO:CONSOLE(0)] "[GroupMarkerNotSet(crbug.com/242999)!:0CBEF4F6]GL ERROR :GL_INVALID_ENUM : BackFramebuffer::Create: <- error from previous GL command", source: https://m.ctrip.com/webapp/you/gsdestination/place/2.html?seo=0&ishideheader=true&secondwakeup=true&dpclickjump=true&allianceid=66672&sid=1693366&from=https%3A%2F%2Fm.ctrip.com%2Fhtml5%2F (0)
E/cr_LocationProvider( 7291): Caught security exception while registering for location updates from the system. The application does not have sufficient geolocation permissions.
E/cr_LocationProvider( 7291): newErrorAvailable application does not have sufficient geolocation permissions.
E/cr_LocationProvider( 7291): Caught security exception while registering for location updates from the system. The application does not have sufficient geolocation permissions.
E/cr_LocationProvider( 7291): newErrorAvailable application does not have sufficient geolocation permissions.
E/cr_LocationProvider( 7291): Caught security exception while registering for location updates from the system. The application does not have sufficient geolocation permissions.
E/cr_LocationProvider( 7291): newErrorAvailable application does not have sufficient geolocation permissions.
I/flutter ( 7291): Instance of 'WebViewHttpError'

尝试加过以下权限 但是没用

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE">
写回答

2回答

CrazyCodeBoy

2022-09-05

换成这个https://pub.dev/packages/webview_flutter
插件看还是否有这个问题呢
0
0

CrazyCodeBoy

2022-08-30

你用真机运行项目试试看能否打开呢
0
3
大愚不治阿
回复
demonCry
还没解决吗
2023-03-17
共3条回复

Flutter从入门到进阶 实战携程网App 一网打尽核心技术

解锁Flutter开发新姿势,,系统掌握Flutter开发核心技术。

4788 学习 · 3270 问题

查看课程