I’m using WebViewClient to browse urls using the emulator. after a while (cannot tell exactly the cause), the pages cannot be loaded anymore or they view takes forever, for the same sites as before that were very fast.
Usually i see under onReceivedError the error -2 (WebViewClient.ERROR_HOST_LOOKUP)
Any help/reference would be appreciated.
Thanks!
W/ThrottleService( 91): unable to find stats for iface rmnet0
D/dalvikvm( 171): GC_CONCURRENT freed 457K, 8% free 6971K/7559K, paused 11ms+7ms
F/NetworkStats( 91): problem reading network stats
F/NetworkStats( 91): java.lang.IllegalStateException: problem parsing idx 1
F/NetworkStats( 91): at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:300)
F/NetworkStats( 91): at com.android.server.NetworkManagementService.getNetworkStatsUidDetail(NetworkManagementService.java:1282)
F/NetworkStats( 91): at com.android.server.net.NetworkStatsService.performPollLocked(NetworkStatsService.java:831)
F/NetworkStats( 91): at com.android.server.net.NetworkStatsService.performPoll(NetworkStatsService.java:799)
F/NetworkStats( 91): at com.android.server.net.NetworkStatsService.access$100(NetworkStatsService.java:128)
F/NetworkStats( 91): at com.android.server.net.NetworkStatsService$3.onReceive(NetworkStatsService.java:633)
F/NetworkStats( 91): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728)
F/NetworkStats( 91): at android.os.Handler.handleCallback(Handler.java:605)
F/NetworkStats( 91): at android.os.Handler.dispatchMessage(Handler.java:92)
F/NetworkStats( 91): at android.os.Looper.loop(Looper.java:137)
F/NetworkStats( 91): at android.os.HandlerThread.run(HandlerThread.java:60)
F/NetworkStats( 91): Caused by: java.io.FileNotFoundException: /proc/net/xt_qtaguid/stats: open failed: ENOENT (No such file or directory)
F/NetworkStats( 91): at libcore.io.IoBridge.open(IoBridge.java:406)
F/NetworkStats( 91): at java.io.FileInputStream.(FileInputStream.java:78)
F/NetworkStats( 91): at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:269)
F/NetworkStats( 91): … 10 more
F/NetworkStats( 91): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
F/NetworkStats( 91): at libcore.io.Posix.open(Native Method)
F/NetworkStats( 91): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
F/NetworkStats( 91): at libcore.io.IoBridge.open(IoBridge.java:390)
F/NetworkStats( 91): … 12 more
D/dalvikvm( 91): GC_CONCURRENT freed 508K, 8% free 9025K/9735K, paused 6ms+24ms
W/ThrottleService( 91): unable to find stats for iface rmnet0
Use below working code ::
And also in your main.xml layout you must have a webview with id webview
Then replace the below lines and try
with.. mwebview.loadUrl(“http://abc.com”);