Android Webview does not return site content

0

I try to run the application below without success. The error returned informs that the site does not respond, what can it be?

MainActivity.java and logcat. Thanks in advance for your attention.

package com.mycompany.TesteWebView;

import android.app.*;
import android.os.*;
import android.webkit.*;

public class MainActivity extends Activity 
{   
@Override
   protected void onCreate(Bundle         savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

WebView myWebView = (WebView)      findViewById(R.id.webview);
  WebSettings webSettings =      myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setDomStorageEnabled(true);
 myWebView.loadUrl("http://www.google.com.uk");
             }
    }

log:

Late-enabling -Xcheck:jni
04-02 21:13:16.682 23877 23877 W        System                                       ClassLoader      referenced unknown path:      /data/app/com.mycompany.TesteWebView-2/lib/arm
 04-02 21:13:25.541 23877 23877 I   WebViewFactory                               Loading com.google.android.webview version 56.0.2924.87 (code 292408700)
 04-02 21:13:25.696 23877 23877 I   art                                          Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
 04-02 21:13:25.697 23877 23877 I   art                                          Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
04-02 21:13:25.704 23877 23877 I   art                                          Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
04-02 21:13:25.705 23877 23877 I   art                                          Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
04-02 21:13:25.718 23877 23877 I   cr_LibraryLoader                             Time to load native libraries: 2 ms (timestamps 2997-2999)
04-02 21:13:25.718 23877 23877 I   cr_LibraryLoader                             Expected native library version number "56.0.2924.87", actual native library version number "56.0.2924.87"
 04-02 21:13:25.760 23877 23877 I   cr_LibraryLoader                             Expected native library version number "56.0.2924.87", actual native library version number "56.0.2924.87"
 04-02 21:13:25.763 23877 23877 I   chromium                                     [INFO:library_loader_hooks.cc(163)] Chromium logging enabled: level = 0, default verbosity = 0
04-02 21:13:25.779 23877 23877 I   cr_BrowserStartup                            Initializing chromium process, singleProcess=true
04-02 21:13:25.814 23877 23877 I   Adreno-EGL                                   <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 10/09/15, 6cbbf7d, I3193f6e94a
 04-02 21:13:26.183 23877 23877 I   cr_Ime                                       ImeThread is enabled.
04-02 21:13:26.202 23877 24117 W   cr_media                                     Requires BLUETOOTH permission
04-02 21:13:26.255 23877 24122 D   OpenGLRenderer                               Use EGL_SWAP_BEHAVIOR_PRESERVED: true
 04-02 21:13:26.367 23877 24122 I   OpenGLRenderer                               Initialized EGL, version 1.4
 04-02 21:13:26.750 23877 24142 E   libEGL                                       validate_display:255 error 3008 (EGL_BAD_DISPLAY)
 04-02 21:13:26.875 23877 24142 W   VideoCapabilities                            Unrecognized profile 2130706433 for video/avc
 04-02 21:13:26.902 23877 24142 W   VideoCapabilities                            Unrecognized profile/level 0/3 for video/mpeg2
 04-02 21:13:26.952 23877 24142 I   VideoCapabilities                            Unsupported profile 4 for video/mp4v-es
04-02 21:13:27.023 23877 23877 W   cr_BindingManager                            Cannot call determinedVisibility() - never saw a connection for the pid: 23877
04-02 21:13:27.036 23877 23877 W   cr_BindingManager                            Cannot call determinedVisibility() - never saw a connection for the pid: 23877
04-02 21:13:33.536 23877 24122 E   Surface                                      getSlotFromBufferLocked: unknown buffer: 0xb8f77c70

( link )

    
asked by anonymous 03.04.2017 / 11:45

1 answer

0

Check the following items:

  • Internet Permission in AndroidManifest.xml ( <uses-permission android:name="android.permission.INTERNET" /> )
  • Site really exists.

I tested the site you're trying to reach: www.google.com.uk, but it's not accessible in the browser. Get tested with www.google.com.

    
03.04.2017 / 13:35