zoukankan      html  css  js  c++  java
  • android编程异常解决 FATAL EXCEPTION: main android.view.InflateException: Binary XML file line #195: Erro

    初学Android,碰到一个运行时错误,耽误了半天,错误如下

    09-06 15:44:43.095: E/AndroidRuntime(7904): FATAL EXCEPTION: main
    09-06 15:44:43.095: E/AndroidRuntime(7904): android.view.InflateException: Binary XML file line #195: Error inflating class com.bn.lccx.GGViewCX
    09-06 15:44:43.095: E/AndroidRuntime(7904): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:698)
    09-06 15:44:43.095: E/AndroidRuntime(7904): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
    09-06 15:44:43.095: E/AndroidRuntime(7904): at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)

    原因:我新建工程与源码名称不一致,源程序中使用了自定义样式,引用了路径,与现有路径不一样所致

    解决办法:找到日志中的错误文件:Error inflating class com.bn.lccx.GGViewCX,把自动定义的GGViewCX.xml中的com.bn.lccx改为自己的,如work.tielu.GGViewCX,问题解决

  • 相关阅读:
    罗马数字
    逆序对
    等价串
    郊区春游
    贝壳找房函数最值
    Educational Codeforces Round 45 Editorial
    Codeforces Round #486 (Div. 3)
    checkbox保存和赋值
    oninput和onchange的区别
    cookie路径概念理解
  • 原文地址:https://www.cnblogs.com/AlexanderZhao/p/12878750.html
Copyright © 2011-2022 走看看