-2

Many times to open the WebView, resulting in a number of WebView, it is estimated that the memory leak, I would like to ask a way to solve it?

Shutting down VM

threadid=1: thread exiting with uncaught exception (group=0xa617e908)

 uncaughtException   java.lang.NullPointerException

java.lang.NullPointerException

    at android.webkit.WebViewClassic.loadUrlImpl(WebViewClassic.java:2525)

    at android.webkit.WebViewClassic.loadUrlImpl(WebViewClassic.java:2541)

    at android.webkit.WebViewClassic.loadUrl(WebViewClassic.java:2534)

    at android.webkit.WebView.loadUrl(WebView.java:784)

    at cn.nin.common.MyAndroid$MyAsyncTask.onPostExecute(MyAndroid.java:1461)

    at cn.nin.common.MyAndroid$MyAsyncTask.onPostExecute(MyAndroid.java:1362)

    at android.os.AsyncTask.finish(AsyncTask.java:631)

    at android.os.AsyncTask.access$600(AsyncTask.java:177)

    at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)

    at android.os.Handler.dispatchMessage(Handler.java:99)

    at android.os.Looper.loop(Looper.java:137)

    at android.app.ActivityThread.main(ActivityThread.java:5041)

    at java.lang.reflect.Method.invokeNative(Native Method)

    at java.lang.reflect.Method.invoke(Method.java:511)

    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)

    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)

    at dalvik.system.NativeStart.main(Native Method)
kmkim
  • 1
  • 1

1 Answers1

1

You didn't give us enough information. NullPointerException can be thrown for many reasons.That error means that an application attempts to use an object reference that has the null value.

skyCode
  • 358
  • 1
  • 7
  • sorry,the question is:Many times to open the WebView, resulting in a number of WebView, it is estimated that the memory leak, I would like to ask a way to solve it? – kmkim Mar 23 '17 at 04:23
  • I can't tell you what is wrong without looking at the code, but this maybe can help. http://stackoverflow.com/questions/3130654/memory-leak-in-webview – skyCode Mar 23 '17 at 04:35