strange log entry related to webcoreglue in android

一笑奈何 提交于 2019-12-06 21:39:41

问题


Since 2 days , i get the following error when i run my app on the device, however it runs fine on the emulator can any 1 help me in solving this error?

 E  3762    webcoreglue the real object has been deleted

 E  3762    webcoreglue the real object has been deleted

 E  3762    webcoreglue the real object has been deleted

 E  3762    webcoreglue the real object has been deleted

it occurs when i m loggin in to facebook login webview through my app.

the login dialog appears fr a tenth of a second and then disappears

any suggestions? thanks ..


回答1:


In my case the webcoreglue "the real object has been deleted" was caused by a missing "webView.destroy();". After calling the activity multiple times i got the error message.

@Override    
public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.help);

   String fileName = this.getIntent().getStringExtra("filename");
   webView = (WebView) findViewById(R.id.webview);
   webView.loadUrl(fileName); //file:///...html
}


@Override
public void onDestroy() {
   super.onDestroy();
   webView.destroy(); //<-- !!!
}



回答2:


This is generally related to orientation change (also activity changes). You can generally get around this by adding the following to your manifest for your main activity:

android:configChanges=”keyboard|keyboardHidden|orientation”


来源:https://stackoverflow.com/questions/7819690/strange-log-entry-related-to-webcoreglue-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!