2019独角兽企业重金招聘Python工程师标准>>>

Error inflating class android.webkit.WebView
..... Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x2040003

Android5.1.1 Lollipop (API 22) 上通过解决自定义WebView

    public X5WebView(Context context) {super(getFixedContext(context));init();}public X5WebView(Context context, AttributeSet attrs) {super(getFixedContext(context), attrs, 0);init();}public X5WebView(Context context, AttributeSet attrs, int defStyleAttr) {super(getFixedContext(context), attrs, defStyleAttr, false);init();}//    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
//    public X5WebView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
//        super(getFixedContext(context), attrs, defStyleAttr, defStyleRes);
//        init();
//    }//    public X5WebView(Context context, AttributeSet attrs, int defStyleAttr, boolean privateBrowsing) {
//        super(getFixedContext(context), attrs, defStyleAttr, privateBrowsing);
//        init();
//    }
   public static Context getFixedContext(Context context) {if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {return context.createConfigurationContext(new Configuration());} else {return context;}}

转载于:https://my.oschina.net/ccmagic/blog/3027531

Error inflating class android.webkit.WebView Caused by: ...: String resource ID #0x2040003相关推荐

  1. Error inflating class android.webkit.WebView

    最近项目中遇到一个关于WebView的问题,报错:Error inflating class android.webkit.WebView 特此记录一下解决方案(这里是针对如下配置问题的对应方案,不符 ...

  2. Android 5.x浏览器webView或者qqX5崩溃,Resources$NotFoundException:String resource ID #0x2040003

    Android 5.x浏览器webView或者qqX5崩溃,Resources$NotFoundException:String resource ID #0x2040003 周末客户反馈app中h5 ...

  3. AndroidStudio中提示:android.content.res.Resources NotFoundException: String resource ID 0x

    场景 在Android Studio中对TextView调用setText时传入的是Int类型的值,就会提示: android.content.res.Resources NotFoundExcept ...

  4. Android报“android.content.res.Resources$NotFoundException: String resource ID #0x2”错误

    Android报"android.content.res.Resources$NotFoundException: String resource ID #0x2"错误 当调用se ...

  5. android.content.res.Resources$NotFoundException: String resource ID XXXX

    错误:android.content.res.Resources$NotFoundException: String resource ID XXXX 原因:一般发生在参数 int resId 错误, ...

  6. 【Android踩过的坑】5.android.content.res.Resources$NotFoundException: String resource ID #0x0

    [Android踩过的坑]5.android.content.res.Resources$NotFoundException: String resource ID #0x0 情况: TextView ...

  7. android.content.res.Resources$NotFoundException: String resource ID #0x0

    仔细检查是不是在settext的时候设置进去的时int属性的值,所以android会认为这是在strings中的值,所以会拿着这个int值当做string的id值去找,结果当然是找不到的. 转载于:h ...

  8. Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0

    如果遇到这个问题,首先考虑以下原因: 你是否在setText()方法中设置了一个int型变量,比如setText(10). 这样Android系统就会主动去资源文件当中寻找, 但是它不是一个资源文件I ...

  9. android.content.res.Resources$NotFoundException: String resource ID #0x1

    这个错误一般就是TextView 赋值的时候String 类型的值,却赋值了一个其他类型的比如int 这个时候你需要处理一些把要要赋值的数转换成string 类型即可.

  10. Error inflating class android.widget.LinearLayout

    报错: E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.example.massage, PID: 4029     java.lan ...

最新文章

  1. php基础:switch cass控制结构 代替if
  2. java mp3播放器 ×××面
  3. ESXI使用记录---安装vSphere(VCSA)
  4. python yaml配置文件_python读取yaml配置文件
  5. mysql之 mysql 5.6不停机主从搭建(一主一从基于GTID复制)
  6. How run Powershell ISE on WIndows Server2008
  7. 【java】java原生序列化和Kryo序列化性能实例对比分析
  8. 【Oracle学习】archivelog
  9. 推荐一些socket工具,TCP、UDP调试、抓包工具
  10. python英文词频统计代码_python词频统计_英文
  11. Linux 下Nginx SSL/HTTPS 配置
  12. ENVI5.3+PolSARpro5.0环境下高分三号双极化数据预处理及地理编码
  13. win10电脑用命令行关机
  14. 如何在阿里云服务器上安装爱快软路由系统
  15. dokcer基础命令-详解
  16. 女孩起名字:100个优秀的女孩名字大全
  17. 牛客网SQL实战二刷 | Day1
  18. gsyVideoPlayer点击/拖动进度条播放视频会回退
  19. VMware Workstation15.1.0安装Windows 1903虚拟机
  20. requests模块的异常处理

热门文章

  1. AWS免费云服务套餐申请步骤及常见问题
  2. C语言图形库简单对比及EGE库的安装小手册
  3. 传入一个月份获取该月的统计信息
  4. linux第三版 网页链接
  5. A1113 | Integer Set Partition (25)
  6. 【JAVA错误笔记】 - Unable add facets project AnnotationWebService CXF 2-x Web Services
  7. 对于placeholder浏览器兼容性(包括密码输入框)解决办法
  8. (十)unity4.6学习Ugui中文文档-------參考-UGUI Canvas Components
  9. 如何用bat批处理编译swf项目
  10. 安装TensorFlow-gpu