Android 5.x浏览器webView或者qqX5崩溃,Resources$NotFoundException:String resource ID #0x2040003
2020-03-05 01:14
1856 查看
Android 5.x浏览器webView或者qqX5崩溃,Resources$NotFoundException:String resource ID #0x2040003
周末客户反馈app中h5页面崩溃,bugly显示
java.lang.RuntimeException:Unable to start activity ComponentInfo{com.gw.huiyou/com.stategrid.ghwapp.module.main.views.GoodsWebActivity}: android.view.InflateException: Binary XML file line #10: Error inflating class net.coming.dev.view.MyX5WebView 2 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585) 3 ...... 4 Caused by: 5 android.content.res.Resources$NotFoundException:String resource ID #0x2040003 6 android.content.res.Resources.getText(Resources.java:338) 7 android.content.res.VivoResources.getText(VivoResources.java:123) 8 android.content.res.Resources.getString(Resources.java:436) 9 com.android.org.chromium.content.browser.ContentViewCore.setContainerView(ContentViewCore.java:694) 10 com.android.org.chromium.content.browser.ContentViewCore.initialize(ContentViewCore.java:618) 11 com.android.org.chromium.android_webview.AwContents.createAndInitializeContentViewCore(AwContents.java:674) 12 com.android.org.chromium.android_webview.AwContents.setNewAwContents(AwContents.java:823) 13 com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:662) 14 com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:597) 15 com.android.webview.chromium.WebViewChromium.initForReal(WebViewChromium.java:319) 16 com.android.webview.chromium.WebViewChromium.access$100(WebViewChromium.java:104) 17 com.android.webview.chromium.WebViewChromium$1.run(WebViewChromium.java:271) 18 com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.drainQueue(WebViewChromium.java:131) 19 com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue$1.run(WebViewChromium.java:118) 20 com.android.org.chromium.base.ThreadUtils.runOnUiThread(ThreadUtils.java:144) 21 com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.addTask(WebViewChromium.java:115) 22 com.android.webview.chromium.WebViewChromium.init(WebViewChromium.java:268) 23 android.webkit.WebView.<init>(WebView.java:591) 24 android.webkit.WebView.<init>(WebView.java:526) 25 android.webkit.WebView.<init>(WebView.java:509) 26 android.webkit.WebView.<init>(WebView.java:496) 27 com.tencent.smtt.sdk.WebView$a.<init>(Unknown Source) 28 com.tencent.smtt.sdk.WebView.<init>(Unknown Source) 29 com.tencent.smtt.sdk.WebView.<init>(Unknown Source) 30 com.tencent.smtt.sdk.WebView.<init>(Unknown Source) 31 com.tencent.smtt.sdk.WebView.<init>(Unknown Source) 32 net.coming.dev.view.MyX5WebView.<init>(MyX5WebView.java:88) 33 java.lang.reflect.Constructor.newInstance(Native Method) 34 java.lang.reflect.Constructor.newInstance(Constructor.java:288) 35 android.view.LayoutInflater.createView(LayoutInflater.java:607) 36 android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) 37 android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 38 android.view.LayoutInflater.inflate(LayoutInflater.java:504) 39 android.view.LayoutInflater.inflate(LayoutInflater.java:414) 40 android.view.LayoutInflater.inflate(LayoutInflater.java:365) 41 androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555) 42 androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161) 43 net.coming.dev.ioc.IocBaseActivity.setContentView(IocBaseActivity.java:44) 44 com.stategrid.ghwapp.module.main.views.GoodsWebActivity.initView(GoodsWebActivity.java:107) 45 net.coming.dev.base.BaseMvpActivity.onCreate(BaseMvpActivity.java:72) 46 android.app.Activity.performCreate(Activity.java:6176) 47 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1115) 48 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2532) 49 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2659) 50 android.app.ActivityThread.access$900(ActivityThread.java:188) 51 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1521) 52 android.os.Handler.dispatchMessage(Handler.java:111) 53 android.os.Looper.loop(Looper.java:194) 54 android.app.ActivityThread.main(ActivityThread.java:5714) 55 java.lang.reflect.Method.invoke(Native Method) 56 java.lang.reflect.Method.invoke(Method.java:372) 57 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:984) 58 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
看到问题貌似不是代码中的,考虑是不是qq x5的问题,换了原生webView依然不见效。百度一圈,虽然找到类似问题,可是并没有解决方案。最后决定用笨方法,代码回滚。根据不同时段webview在Android5.x中的运行情况,定位到迁移androidx后,升级1.1.0出现了问题:
appcompat : 'androidx.appcompat:appcompat:1.1.0',
当引用1.0.0时正常,原来这一版对webview有更改。为了快速修复问题,先行后退版本。
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- Android7.0 webview android.content.res.Resources$NotFoundException
- Android5.0上WebView的android.content.res.Resources$NotFoundException
- textView.setText() 的时候报错 android.content.res.Resources$NotFoundException: String resource ID #0x0
- TextView异常:android.content.res.Resources$NotFoundException: String resource ID #0x0
- android.content.pm.PackageManager$NameNotFoundException: com.google.android.webview错误
- #新手遇到android.content.res.Resources$NotFoundException: String resource ID #0xc和recycleview每页只显示一个item
- [已解决]findviewbyid android.content.res.Resources$NotFoundException
- android.content.res.Resources$NotFoundException: String resource ID #0x1
- android.content.res.Resources$NotFoundException: String resource ID #0x1
- android.content.res.Resources$NotFoundException: String resource ID
- android.content.res.Resources$NotFoundException: String resource ID #0x4
- Android问题解决记录—android.content.res.Resources$NotFoundException: Unable to find resource ID
- Android Studio引入Library后运行报"Resources$NotFoundException"的解决办法(原)
- android.content.res.Resources$NotFoundException 的解决方法
- android.content.res.Resources$NotFoundException: String resource ID #0x1
- android.content.res.Resources$NotFoundException:String resource ID #xxxx
- Android Studio 3.0 Canary 6 release bug android.content.res.Resources$NotFoundException
- 安卓中出现android.content.res.Resources$NotFoundException: String resource ID #0x0
- android.content.res.Resources$NotFoundException: String resource ID #0x0
- Android调用系统EMAIL发送邮件崩溃,android.content.ActivityNotFoundException