简体   繁体   English

WebView 出现问题,卡在加载中

[英]Problem with WebView, gets stuck in loading

I am having a problem where my page gets stuck in a load page, it's just with that page, I thought it was because it had no javascript enabled, then added it and added a bunch of other code probably I won't need, but it was to discard.我遇到了一个问题,我的页面卡在加载页面中,它只是在那个页面上,我认为这是因为它没有启用 javascript,然后添加了它并添加了一堆我可能不需要的其他代码,但是它是丢弃。

Any idea what it would be the problem?知道会有什么问题吗?

import android.content.pm.ActivityInfo;
import android.os.Build;
import android.os.Bundle;

import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import android.view.WindowManager;
import android.webkit.GeolocationPermissions;
import android.webkit.WebChromeClient;
import android.webkit.WebResourceRequest;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

//Obtain the WebSettings object//
    WebSettings webSettings = browser.getSettings();

    browser.setWebChromeClient(new WebChromeClient() {
        public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
            // callback.invoke(String origin, boolean allow, boolean remember);
            callback.invoke(origin, true, false);
                                   }

                               });



browser.getSettings().setUseWideViewPort(true);
        browser.getSettings().setLoadWithOverviewMode(true);
        browser.getSettings().setDomStorageEnabled(true);
        browser.clearView();
        browser.setHorizontalScrollBarEnabled(false);
        browser.getSettings().setAppCacheEnabled(true);
        browser.getSettings().setDatabaseEnabled(true);
        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
            browser.getSettings().setDatabasePath("/data/data/" + this.getPackageName() + "/databases/");
        }
        browser.setVerticalScrollBarEnabled(false);
        browser.getSettings().setBuiltInZoomControls(true);
        browser.getSettings().setDisplayZoomControls(false);
        browser.getSettings().setAllowFileAccess(true);
        browser.getSettings().setPluginState(WebSettings.PluginState.OFF);
        browser.setScrollbarFadingEnabled(false);
        browser.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
        browser.getSettings().setDefaultZoom(WebSettings.ZoomDensity.FAR);
        browser.setWebViewClient(new WebViewClient());
        browser.getSettings().setRenderPriority(WebSettings.RenderPriority.HIGH);
        browser.setInitialScale(1);


    browser.loadUrl("https://s167-es.ogame.gameforge.com/game/index.php?page=ingame&component=overview");
    Toast.makeText(this, "Loading... Wait, please...",
            Toast.LENGTH_LONG).show();
    browser.setWebViewClient(new WebViewClient() {
        // evita que los enlaces se abran fuera nuestra app en el navegador de android
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            return false;
        }

    });
}

} }

这就是它卡住的方式(总是加载)

Then in a normal browser what should happen is that it would open a new tab with the game in there, which uses javascript too just in case it's important.然后在普通浏览器中应该发生的是它会打开一个包含游戏的新选项卡,它也使用 javascript 以防万一它很重要。

这是您在普通浏览器中单击的位置,即我单击模拟器的那个按钮,然后我得到加载卡住的页面。

And here is the source code view from the previous image: (in google chrome, but my points it's maybe you find something that helps you determine if I'm lacking of some code in the webview or something.这是上一张图片的源代码视图:(在谷歌浏览器中,但我的观点是,您可能会找到一些可以帮助您确定我是否在 web视图中缺少某些代码的东西。

<!do ctype htm l><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=de vice-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="icon" href="/favicon.ico"><script type="text/javascript" src="/config/configuration.js"></script><title></title><link href="https://s3-static.geo.gfsrv.net/browsergamelobby/ogame/2.7.0/css/main.33ce9fb9.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="planet"></div><script type="text/javascript" src="https://s3-static.geo.gfsrv.net/browsergamelobby/ogame/2.7.0/js/main.b0b4a5d3.js"></scri pt></body></html>

Here is my LOGCAT : 2020-02-07 02:45:31.362 21035-21035/? I/me.serverOctan: Not late-enabling -Xcheck:jni (already on) 2020-02-07 02:45:31.377 21035-21035/? E/me.serverOctan: Unknown bits set in runtime_flags: 0x8000 2020-02-07 02:45:31.384 21035-21035/? W/me.serverOctan: Unexpected CPU variant for X86 using defaults: x86 2020-02-07 02:45:31.518 21035-21070/? D/libEGL: Emulator has host GPU support, qemu.gles is set to 1. 2020-02-07 02:45:31.520 21035-21070/? W/libc: Unable to set property "qemu.gles" to "1": connection failed; errno=13 (Permission denied) 2020-02-07 02:45:31.507 21035-21035/? W/RenderThread: type=1400 audit(0.0:124): avc: denied { write } for name="property_service" dev="tmpfs" ino=7421 scontext=u:r:untrusted_app:s0:c142,c256,c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0 app=OGame.serverOctans 2020-02-07 02:45:31.532 21035-21070/? D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so 2020-02-07 02:45:31.535 21035-21070/? D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so 2020-02-07 02:45:31.537 21035-21070/? D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so 2020-02-07 02:45:31.614 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed) 2020-02-07 02:45:31.614 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) 2020-02-07 02:45:31.623 21035-21035/? I/WebViewFactory: Loading com.google.android.webview version 74.0.3729.185 (code 373018518) 2020-02-07 02:45:31.626 21035-21035/? I/me.serverOctan: The ClassLoaderContext is a special shared library. 2020-02-07 02:45:31.629 21035-21035/? I/me.serverOctan: The ClassLoaderContext is a special shared library. 2020-02-07 02:45:31.660 21035-21035/? I/cr_LibraryLoader: Time to load native libraries: 4 ms (timestamps 5821-5825) 2020-02-07 02:45:31.673 21035-21035/? I/chromium: [INFO:library_loader_hooks.cc(50)] Chromium logging enabled: level = 0, default verbosity = 0 2020-02-07 02:45:31.673 21035-21035/? I/cr_LibraryLoader: Expected native library version number "74.0.3729.185", actual native library version number "74.0.3729.185" 2020-02-07 02:45:31.678 21035-21075/? W/cr_ChildProcLH: Create a new ChildConnectionAllocator with package name = com.google.android.webview, sandboxed = true 2020-02-07 02:45:31.683 21035-21075/? W/me.serverOctan: Accessing hidden method Landroid/content/Context;->bindServiceAsUser(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/Handler;Landroid/os/UserHandle;)Z (greylist, reflection, allowed) 2020-02-07 02:45:31.688 21035-21035/? I/cr_BrowserStartup: Initializing chromium process, singleProcess=false 2020-02-07 02:45:31.819 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V (greylist, reflection, allowed) 2020-02-07 02:45:31.819 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V (greylist, reflection, allowed) 2020-02-07 02:45:31.819 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.820 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.820 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.820 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.820 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.820 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.851 21035-21111/? D/HostConnection: HostConnection::get() New Host Connection established 0xe1a3fd20, tid 21111 2020-02-07 02:45:31.858 21035-21111/? D/HostConnection: 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_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_1 2020-02-07 02:45:31.864 21035-21103/? W/cr_media: Requires BLUETOOTH permission 2020-02-07 02:45:31.887 21035-21111/? D/EGL_emulation: eglCreateContext: 0xe1a1baa0: maj 3 min 1 rcv 4 2020-02-07 02:45:31.890 21035-21111/? D/EGL_emulation: eglMakeCurrent: 0xe1a1baa0: ver 3 1 (tinfo 0xe1a0fec0) 2020-02-07 02:45:31.893 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2020-02-07 02:45:31.893 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2020-02-07 02:45:31.976 21035-21068/? D/HostConnection: HostConnection::get() New Host Connection established 0xde52daa0, tid 21068 2020-02-07 02:45:31.977 21035-21068/? D/HostConnection: 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_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_1 2020-02-07 02:45:31.977 21035-21068/? W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without... 2020-02-07 02:45:31.993 21035-21111/? I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es 2020-02-07 02:45:31.996 21035-21111/? W/cr_MediaCodecUtil: HW encoder for video/avc is not available on this device. 2020-02-07 02:45:32.011 21035-21068/? D/EGL_emulation: eglCreateContext: 0xebb10080: maj 3 min 1 rcv 4 2020-02-07 02:45:32.020 21035-21068/? D/EGL_emulation: eglMakeCurrent: 0xebb10080: ver 3 1 (tinfo 0xca674190) 2020-02-07 02:45:32.036 21035-21068/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2020-02-07 02:45:32.036 21035-21068/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2020-02-07 02:45:32.036 21035-21111/? D/EGL_emulation: eglCreateContext: 0xe1a1ca60: maj 3 min 0 rcv 3 2020-02-07 02:45:32.038 21035-21111/? D/EGL_emulation: eglMakeCurrent: 0xe1a1ca60: ver 3 0 (tinfo 0xe1a0fec0) 2020-02-07 02:45:32.050 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:32.050 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:32.079 21035-21068/? W/Gralloc3: mapper 3.x is not supported 2020-02-07 02:45:32.083 21035-21068/? D/HostConnection: createUnique: call 2020-02-07 02:45:32.084 21035-21068/? D/HostConnection: HostConnection::get() New Host Connection established 0xca9745b0, tid 21068 2020-02-07 02:45:32.085 21035-21068/? D/HostConnection: 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_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_1 2020-02-07 02:45:32.086 21035-21068/? D/eglCodecCommon: allocate: Ask for block of size 0x1000 2020-02-07 02:45:32.086 21035-21068/? D/eglCodecCommon: allocate: ioctl allocate returned offset 0x3ff740000 size 0x2000 2020-02-07 02:45:32.102 21035-21068/? D/EGL_emulation: eglMakeCurrent: 0xebb10080: ver 3 1 (tinfo 0xca674190) 2020-02-07 02:45:32.156 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:32.157 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:32.160 21035-21068/? D/EGL_emulation: eglMakeCurrent: 0xebb10080: ver 3 1 (tinfo 0xca674190) 2020-02-07 02:45:32.198 21035-21068/? D/EGL_emulation: eglMakeCurrent: 0xebb10080: ver 3 1 (tinfo 0xca674190) 2020-02-07 02:45:32.414 21035-21090/OGame.serverOctans D/NetworkSecurityConfig: No Network Security Config specified, using platform default 2020-02-07 02:45:34.074 21035-21068/OGame.serverOctans E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:34.074 21035-21068/OGame.serverOctans E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:34.643 21035-21111/OGame.serverOctans E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:34.646 21035-21111/OGame.serverOctans I/chatty: uid=10142(OGame.serverOctans) Chrome_InProcGp identical 2 lines 2020-02-07 02:45:34.646 21035-21111/OGame.serverOctans E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:37.285 21035-21091/OGame.serverOctans W/chromium: [WARNING:spdy_session.cc(3232)] Received HEADERS for invalid stream 23这是我的LOGCAT2020-02-07 02:45:31.362 21035-21035/? I/me.serverOctan: Not late-enabling -Xcheck:jni (already on) 2020-02-07 02:45:31.377 21035-21035/? E/me.serverOctan: Unknown bits set in runtime_flags: 0x8000 2020-02-07 02:45:31.384 21035-21035/? W/me.serverOctan: Unexpected CPU variant for X86 using defaults: x86 2020-02-07 02:45:31.518 21035-21070/? D/libEGL: Emulator has host GPU support, qemu.gles is set to 1. 2020-02-07 02:45:31.520 21035-21070/? W/libc: Unable to set property "qemu.gles" to "1": connection failed; errno=13 (Permission denied) 2020-02-07 02:45:31.507 21035-21035/? W/RenderThread: type=1400 audit(0.0:124): avc: denied { write } for name="property_service" dev="tmpfs" ino=7421 scontext=u:r:untrusted_app:s0:c142,c256,c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0 app=OGame.serverOctans 2020-02-07 02:45:31.532 21035-21070/? D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so 2020-02-07 02:45:31.535 21035-21070/? D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so 2020-02-07 02:45:31.537 21035-21070/? D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so 2020-02-07 02:45:31.614 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed) 2020-02-07 02:45:31.614 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) 2020-02-07 02:45:31.623 21035-21035/? I/WebViewFactory: Loading com.google.android.webview version 74.0.3729.185 (code 373018518) 2020-02-07 02:45:31.626 21035-21035/? I/me.serverOctan: The ClassLoaderContext is a special shared library. 2020-02-07 02:45:31.629 21035-21035/? I/me.serverOctan: The ClassLoaderContext is a special shared library. 2020-02-07 02:45:31.660 21035-21035/? I/cr_LibraryLoader: Time to load native libraries: 4 ms (timestamps 5821-5825) 2020-02-07 02:45:31.673 21035-21035/? I/chromium: [INFO:library_loader_hooks.cc(50)] Chromium logging enabled: level = 0, default verbosity = 0 2020-02-07 02:45:31.673 21035-21035/? I/cr_LibraryLoader: Expected native library version number "74.0.3729.185", actual native library version number "74.0.3729.185" 2020-02-07 02:45:31.678 21035-21075/? W/cr_ChildProcLH: Create a new ChildConnectionAllocator with package name = com.google.android.webview, sandboxed = true 2020-02-07 02:45:31.683 21035-21075/? W/me.serverOctan: Accessing hidden method Landroid/content/Context;->bindServiceAsUser(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/Handler;Landroid/os/UserHandle;)Z (greylist, reflection, allowed) 2020-02-07 02:45:31.688 21035-21035/? I/cr_BrowserStartup: Initializing chromium process, singleProcess=false 2020-02-07 02:45:31.819 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V (greylist, reflection, allowed) 2020-02-07 02:45:31.819 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V (greylist, reflection, allowed) 2020-02-07 02:45:31.819 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.820 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.820 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.820 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.820 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.820 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.851 21035-21111/? D/HostConnection: HostConnection::get() New Host Connection established 0xe1a3fd20, tid 21111 2020-02-07 02:45:31.858 21035-21111/? D/HostConnection: 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_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_1 2020-02-07 02:45:31.864 21035-21103/? W/cr_media: Requires BLUETOOTH permission 2020-02-07 02:45:31.887 21035-21111/? D/EGL_emulation: eglCreateContext: 0xe1a1baa0: maj 3 min 1 rcv 4 2020-02-07 02:45:31.890 21035-21111/? D/EGL_emulation: eglMakeCurrent: 0xe1a1baa0: ver 3 1 (tinfo 0xe1a0fec0) 2020-02-07 02:45:31.893 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2020-02-07 02:45:31.893 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2020-02-07 02:45:31.976 21035-21068/? D/HostConnection: HostConnection::get() New Host Connection established 0xde52daa0, tid 21068 2020-02-07 02:45:31.977 21035-21068/? D/HostConnection: 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_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_1 2020-02-07 02:45:31.977 21035-21068/? W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without... 2020-02-07 02:45:31.993 21035-21111/? I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es 2020-02-07 02:45:31.996 21035-21111/? W/cr_MediaCodecUtil: HW encoder for video/avc is not available on this device. 2020-02-07 02:45:32.011 21035-21068/? D/EGL_emulation: eglCreateContext: 0xebb10080: maj 3 min 1 rcv 4 2020-02-07 02:45:32.020 21035-21068/? D/EGL_emulation: eglMakeCurrent: 0xebb10080: ver 3 1 (tinfo 0xca674190) 2020-02-07 02:45:32.036 21035-21068/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2020-02-07 02:45:32.036 21035-21068/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2020-02-07 02:45:32.036 21035-21111/? D/EGL_emulation: eglCreateContext: 0xe1a1ca60: maj 3 min 0 rcv 3 2020-02-07 02:45:32.038 21035-21111/? D/EGL_emulation: eglMakeCurrent: 0xe1a1ca60: ver 3 0 (tinfo 0xe1a0fec0) 2020-02-07 02:45:32.050 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:32.050 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:32.079 21035-21068/? W/Gralloc3: mapper 3.x is not supported 2020-02-07 02:45:32.083 21035-21068/? D/HostConnection: createUnique: call 2020-02-07 02:45:32.084 21035-21068/? D/HostConnection: HostConnection::get() New Host Connection established 0xca9745b0, tid 21068 2020-02-07 02:45:32.085 21035-21068/? D/HostConnection: 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_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_1 2020-02-07 02:45:32.086 21035-21068/? D/eglCodecCommon: allocate: Ask for block of size 0x1000 2020-02-07 02:45:32.086 21035-21068/? D/eglCodecCommon: allocate: ioctl allocate returned offset 0x3ff740000 size 0x2000 2020-02-07 02:45:32.102 21035-21068/? D/EGL_emulation: eglMakeCurrent: 0xebb10080: ver 3 1 (tinfo 0xca674190) 2020-02-07 02:45:32.156 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:32.157 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:32.160 21035-21068/? D/EGL_emulation: eglMakeCurrent: 0xebb10080: ver 3 1 (tinfo 0xca674190) 2020-02-07 02:45:32.198 21035-21068/? D/EGL_emulation: eglMakeCurrent: 0xebb10080: ver 3 1 (tinfo 0xca674190) 2020-02-07 02:45:32.414 21035-21090/OGame.serverOctans D/NetworkSecurityConfig: No Network Security Config specified, using platform default 2020-02-07 02:45:34.074 21035-21068/OGame.serverOctans E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:34.074 21035-21068/OGame.serverOctans E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:34.643 21035-21111/OGame.serverOctans E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:34.646 21035-21111/OGame.serverOctans I/chatty: uid=10142(OGame.serverOctans) Chrome_InProcGp identical 2 lines 2020-02-07 02:45:34.646 21035-21111/OGame.serverOctans E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:37.285 21035-21091/OGame.serverOctans W/chromium: [WARNING:spdy_session.cc(3232)] Received HEADERS for invalid stream 23 2020-02-07 02:45:31.362 21035-21035/? I/me.serverOctan: Not late-enabling -Xcheck:jni (already on) 2020-02-07 02:45:31.377 21035-21035/? E/me.serverOctan: Unknown bits set in runtime_flags: 0x8000 2020-02-07 02:45:31.384 21035-21035/? W/me.serverOctan: Unexpected CPU variant for X86 using defaults: x86 2020-02-07 02:45:31.518 21035-21070/? D/libEGL: Emulator has host GPU support, qemu.gles is set to 1. 2020-02-07 02:45:31.520 21035-21070/? W/libc: Unable to set property "qemu.gles" to "1": connection failed; errno=13 (Permission denied) 2020-02-07 02:45:31.507 21035-21035/? W/RenderThread: type=1400 audit(0.0:124): avc: denied { write } for name="property_service" dev="tmpfs" ino=7421 scontext=u:r:untrusted_app:s0:c142,c256,c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0 app=OGame.serverOctans 2020-02-07 02:45:31.532 21035-21070/? D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so 2020-02-07 02:45:31.535 21035-21070/? D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so 2020-02-07 02:45:31.537 21035-21070/? D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so 2020-02-07 02:45:31.614 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed) 2020-02-07 02:45:31.614 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) 2020-02-07 02:45:31.623 21035-21035/? I/WebViewFactory: Loading com.google.android.webview version 74.0.3729.185 (code 373018518) 2020-02-07 02:45:31.626 21035-21035/? I/me.serverOctan: The ClassLoaderContext is a special shared library. 2020-02-07 02:45:31.629 21035-21035/? I/me.serverOctan: The ClassLoaderContext is a special shared library. 2020-02-07 02:45:31.660 21035-21035/? I/cr_LibraryLoader: Time to load native libraries: 4 ms (timestamps 5821-5825) 2020-02-07 02:45:31.673 21035-21035/? I/chromium: [INFO:library_loader_hooks.cc(50)] Chromium logging enabled: level = 0, default verbosity = 0 2020-02-07 02:45:31.673 21035-21035/? I/cr_LibraryLoader: Expected native library version number "74.0.3729.185", actual native library version number "74.0.3729.185" 2020-02-07 02:45:31.678 21035-21075/? W/cr_ChildProcLH: Create a new ChildConnectionAllocator with package name = com.google.android.webview, sandboxed = true 2020-02-07 02:45:31.683 21035-21075/? W/me.serverOctan: Accessing hidden method Landroid/content/Context;->bindServiceAsUser(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/Handler;Landroid/os/UserHandle;)Z (greylist, reflection, allowed) 2020-02-07 02:45:31.688 21035-21035/? I/cr_BrowserStartup: Initializing chromium process, singleProcess=false 2020-02-07 02:45:31.819 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V (greylist, reflection, allowed) 2020-02-07 02:45:31.819 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V (greylist, reflection, allowed) 2020-02-07 02:45:31.819 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.820 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.820 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.820 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.820 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.820 21035-21035/? W/me.serverOctan: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) 2020-02-07 02:45:31.851 21035-21111/? D/HostConnection: HostConnection::get() New Host Connection established 0xe1a3fd20, tid 21111 2020-02-07 02:45:31.858 21035-21111/? D/HostConnection: 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_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_1 2020-02-07 02:45:31.864 21035-21103/? W/cr_media: Requires BLUETOOTH permission 2020-02-07 02:45:31.887 21035-21111/? D/EGL_emulation: eglCreateContext: 0xe1a1baa0: maj 3 min 1 rcv 4 2020-02-07 02:45:31.890 21035-21111/? D/EGL_emulation: eglMakeCurrent: 0xe1a1baa0: ver 3 1 (tinfo 0xe1a0fec0) 2020-02-07 02:45:31.893 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2020-02-07 02:45:31.893 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2020-02-07 02:45:31.976 21035-21068/? D/HostConnection: HostConnection::get() New Host Connection established 0xde52daa0, tid 21068 2020-02-07 02:45:31.977 21035-21068/? D/HostConnection: 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_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_1 2020-02-07 02:45:31.977 21035-21068/? W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without... 2020-02-07 02:45:31.993 21035-21111/? I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es 2020-02-07 02:45:31.996 21035-21111/? W/cr_MediaCodecUtil: HW encoder for video/avc is not available on this device. 2020-02-07 02:45:32.011 21035-21068/? D/EGL_emulation: eglCreateContext: 0xebb10080: maj 3 min 1 rcv 4 2020-02-07 02:45:32.020 21035-21068/? D/EGL_emulation: eglMakeCurrent: 0xebb10080: ver 3 1 (tinfo 0xca674190) 2020-02-07 02:45:32.036 21035-21068/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2020-02-07 02:45:32.036 21035-21068/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2020-02-07 02:45:32.036 21035-21111/? D/EGL_emulation: eglCreateContext: 0xe1a1ca60: maj 3 min 0 rcv 3 2020-02-07 02:45:32.038 21035-21111/? D/EGL_emulation: eglMakeCurrent: 0xe1a1ca60: ver 3 0 (tinfo 0xe1a0fec0) 2020-02-07 02:45:32.050 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:32.050 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:32.079 21035-21068/? W/Gralloc3: mapper 3.x is not supported 2020-02-07 02:45:32.083 21035-21068/? D/HostConnection: createUnique: call 2020-02-07 02:45:32.084 21035-21068/? D/HostConnection: HostConnection::get() New Host Connection established 0xca9745b0, tid 21068 2020-02-07 02:45:32.085 21035-21068/? D/HostConnection: 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_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_1 2020-02-07 02:45:32.086 21035-21068/? D/eglCodecCommon: allocate: Ask for block of size 0x1000 2020-02-07 02:45:32.086 21035-21068/? D/eglCodecCommon: allocate: ioctl allocate returned offset 0x3ff740000 size 0x2000 2020-02-07 02:45:32.102 21035-21068/? D/EGL_emulation: eglMakeCurrent: 0xebb10080: ver 3 1 (tinfo 0xca674190) 2020-02-07 02:45:32.156 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:32.157 21035-21111/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:32.160 21035-21068/? D/EGL_emulation: eglMakeCurrent: 0xebb10080: ver 3 1 (tinfo 0xca674190) 2020-02-07 02:45:32.198 21035-21068/? D/EGL_emulation: eglMakeCurrent: 0xebb10080: ver 3 1 (tinfo 0xca674190) 2020-02-07 02:45:32.414 21035-21090/OGame.serverOctans D/NetworkSecurityConfig: No Network Security Config specified, using platform default 2020-02-07 02:45:34.074 21035-21068/OGame.serverOctans E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:34.074 21035-21068/OGame.serverOctans E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:34.643 21035-21111/OGame.serverOctans E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:34.646 21035-21111/OGame.serverOctans I/chatty: uid=10142(OGame.serverOctans) Chrome_InProcGp identical 2 lines 2020-02-07 02:45:34.646 21035-21111/OGame.serverOctans E/eglCodecCommon: glUtilsParamSize: unknow param 0x000088ef 2020-02-07 02:45:37.285 21035-21091/OGame.serverOctans W/chromium: [WARNING:spdy_session.cc(3232)] Received HEADERS for invalid stream 23

I believe the problem is related to the content on that URL being completely dynamical created (as you can see in the HTML source) with JavaScript and you have not enabled JavaScript in your WebSettings .我认为问题与该 URL 上的内容完全是用 JavaScript 动态创建的(如您在 HTML 源代码中所见)有关,并且您尚未在WebSettings启用 JavaScript。

There are a few other things happening that is making your code dense to read.还有一些其他事情正在使您的代码难以阅读。

You have this line:你有这条线:

WebSettings webSettings = browser.getSettings();

But then you do this:但是你这样做:

browser.getSettings().setUseWideViewPort(true);

Which could have been written as:可以写成:

webSettings.setUseWideViewPort(true);

As to the issue, I believe the following line may fix the loading:至于这个问题,我相信以下行可以解决加载问题:

webSettings.setJavaScriptEnabled(true);

Personally, I would also include:就个人而言,我还将包括:

webSettings.setLoadsImagesAutomatically(true);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM