【问题标题】:Android webview load data error eglChooseConfig failed with error EGL_BAD_ATTRIBUTEAndroid webview 加载数据错误 eglChooseConfig failed with error EGL_BAD_ATTRIBUTE
【发布时间】:2020-05-28 12:16:52
【问题描述】:

我正在尝试使用 Web 视图将 HTML 制作为位图。在我尝试将我的应用程序置于后台之前,一切都运行正常。我让应用程序像这样来到前台

Intent it = new Intent("intent.my.action");
it.setComponent(new ComponentName(getApplicationContext().getPackageName(),
MainActivity.class.getName()));
it.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getApplicationContext().getApplicationContext().startActivity(it);
Thread.sleep(2000);

之后,我将数据加载到我的 Web 视图并等待 onPageCommitVisible 运行但从未运行!!!

webView.loadData(html, "text/html","UTF-8");

【问题讨论】:

    标签: android android-studio android-layout android-fragments


    【解决方案1】:

    我刚刚将加载数据部分和新的 webclient 添加到 onResume 中调用的函数中,它正在工作

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-10-27
      • 2021-11-28
      • 2022-12-19
      • 1970-01-01
      • 2018-01-05
      • 1970-01-01
      • 1970-01-01
      • 2013-09-07
      相关资源
      最近更新 更多