问题出现情景描述:项目内所有使用webView的界面在vivo5.1.1系统手机统统崩溃,其它测试机没有发现问题,经过下面自定义view处理,解决了在vivo5.1.1手机上面的问题,在其他测试机上面运行也正常。 异常日志描述: 解决方案:android.view.InflateException: Binary XML file line #7: Error inflating class android.webkit.WebView at android.view.LayoutInflater.createView(LayoutInflater.java:633) at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741) at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) at android.view.LayoutInflater.inflate(LayoutInflater.java:504) at android.view.LayoutInflater.inflate(LayoutInflater.java:414) at it.artecoop.ibreviary.WebViewFragment.onCreateView(WebViewFragment.java:67) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2087) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1113) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1295) at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:801) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1682) at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:541) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:288) at android.view.LayoutInflater.createView(LayoutInflater.java:607) at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741) at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) at android.view.LayoutInflater.inflate(LayoutInflater.java:504) at android.view.LayoutInflater.inflate(LayoutInflater.java:414) at it.artecoop.ibreviary.WebViewFragment.onCreateView(WebViewFragment.java:67) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2087) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1113) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1295) at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:801) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1682) at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:541) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x2040003 at android.content.res.Resources.getText(Resources.java:299) at android.content.res.Resources.getString(Resources.java:385) at com.android.org.chromium.content.browser.ContentViewCore.setContainerView(ContentViewCore.java:684) at com.android.org.chromium.content.browser.ContentViewCore.initialize(ContentViewCore.java:608) at com.android.org.chromium.android_webview.AwContents.createAndInitializeContentViewCore(AwContents.java:631) at com.android.org.chromium.android_webview.AwContents.setNewAwContents(AwContents.java:780) at com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:619) at com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:556) at com.android.webview.chromium.WebViewChromium.initForReal(WebViewChromium.java:311) at com.android.webview.chromium.WebViewChromium.access$100(WebViewChromium.java:96) at com.android.webview.chromium.WebViewChromium$1.run(WebViewChromium.java:263) at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.drainQueue(WebViewChromium.java:123) at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue$1.run(WebViewChromium.java:110) at com.android.org.chromium.base.ThreadUtils.runOnUiThread(ThreadUtils.java:144) at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.addTask(WebViewChromium.java:107) at com.android.webview.chromium.WebViewChromium.init(WebViewChromium.java:260) at android.webkit.WebView.<init>(WebView.java:554) at android.webkit.WebView.<init>(WebView.java:489) at android.webkit.WebView.<init>(WebView.java:472) at android.webkit.WebView.<init>(WebView.java:459) at java.lang.reflect.Constructor.newInstance(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:288) at android.view.LayoutInflater.createView(LayoutInflater.java:607) at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741) at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) at android.view.LayoutInflater.inflate(LayoutInflater.java:504) at android.view.LayoutInflater.inflate(LayoutInflater.java:414) at it.artecoop.ibreviary.WebViewFragment.onCreateView(WebViewFragment.java:67) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2087) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1113) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1295) at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:801) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1682) at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:541) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
public class LollipopFixedWebView extends WebView { public LollipopFixedWebView(Context context) { super(getFixedContext(context)); } public LollipopFixedWebView(Context context, AttributeSet attrs) { super(getFixedContext(context), attrs); } public LollipopFixedWebView(Context context, AttributeSet attrs, int defStyleAttr) { super(getFixedContext(context), attrs, defStyleAttr); } @TargetApi(Build.VERSION_CODES.LOLLIPOP) public LollipopFixedWebView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(getFixedContext(context), attrs, defStyleAttr, defStyleRes); } public LollipopFixedWebView(Context context, AttributeSet attrs, int defStyleAttr, boolean privateBrowsing) { super(getFixedContext(context), attrs, defStyleAttr, privateBrowsing); } public static Context getFixedContext(Context context) { return context.createConfigurationContext(new Configuration()); } }
$(“#blog_detail_zk_collection”).click(function(){ window.csdn.articleCollection() }) $.get(“https://blog.csdn.net/lvshuchangyin/article/uvc/101264629”);
本网页所有视频内容由 imoviebox边看边下-网页视频下载, iurlBox网页地址收藏管理器 下载并得到。
ImovieBox网页视频下载器 下载地址: ImovieBox网页视频下载器-最新版本下载
本文章由: imapbox邮箱云存储,邮箱网盘,ImageBox 图片批量下载器,网页图片批量下载专家,网页图片批量下载器,获取到文章图片,imoviebox网页视频批量下载器,下载视频内容,为您提供.
var cpro_id = “u1893232”;
/*580*90 创建于 2015-01-06*/
var cpro_id = “u1893237”;
阅读和此文章类似的: 全球云计算