简体   繁体   中英

android closing if webview enables javascript

When i load google url on webview my app will close. but if i disable the javascript it will work. what should i do? this is the error

sorry if there's error on my question. because i did not always ask question here.

12-09 20:42:25.257: E/linker(1282): load_library(linker.cpp:759): library "libmaliinstr.so" not found 12-09 20:42:31.596: E/AndroidRuntime(1282): FATAL EXCEPTION: WebViewCoreThread 12-09 20:42:31.596: E/AndroidRuntime(1282): java.lang.SecurityException: ConnectivityService: Neither user 10151 nor current process has android.permission.ACCESS_NETWORK_STATE. 12-09 20:42:31.596: E/AndroidRuntime(1282): at android.os.Parcel.readException(Parcel.java:1425) 12-09 20:42:31.596: E/AndroidRuntime(1282): at android.os.Parcel.readException(Parcel.java:1379) 12-09 20:42:31.596: E/AndroidRuntime(1282): at android.net.IConnectivityManager$Stub$Proxy.isActiveNetworkMetered(IConnectivityManager.java:907) 12-09 20:42:31.596: E/AndroidRuntime(1282): at android.net.ConnectivityManager.isActiveNetworkMetered(ConnectivityManager.java:1065) 12-09 20:42:31.596: E/AndroidRuntime(1282): at android.webkit.WebViewCore.isNetworkMetered(WebViewCore.java:692) 12-09 20:42:31.596: E/AndroidRuntime(1282): at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Native Method) 12-09 20:42:31.596: E/AndroidRuntime(1282): at android.webkit.JWebCoreJavaBridge.fireSharedTimer(JWebCoreJavaBridge.java:92) 12-09 20:42:31.596: E/AndroidRuntime(1282): at android.webkit.JWebCoreJavaBridge.handleMessage(JWebCoreJavaBridge.java:108) 12-09 20:42:31.596: E/AndroidRuntime(1282): at androi d.os.Handler.dispatchMessage(Handler.java:107) 12-09 20:42:31.596: E/AndroidRuntime(1282): at android.os.Looper.loop(Looper.java:194) 12-09 20:42:31.596: E/AndroidRuntime(1282): at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:930) 12-09 20:42:31.596: E/AndroidRuntime(1282): at java.lang.Thread.run(Thread.java:838)

i got the answer on my own.

i put android.permission.ACCESS_NETWORK_STATE in my manifest and its work. :D

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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