suchen

Heim  >  Fragen und Antworten  >  Hauptteil

android - react-native 下多次打开webview,产生多个webview,估计是内存泄漏了,请问有办法解决吗?

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)
PHPzPHPz2771 Tage vor906

Antworte allen(1)Ich werde antworten

  • PHP中文网

    PHP中文网2017-04-18 09:18:19

    问题解决了,react native webview 在摧毁后,又调用了webview对象,所以为空了,比较隐蔽所以没看到

    Antwort
    0
  • StornierenAntwort