`

Android.View.InflateException: Binary XML File Line #异常的解决

 
阅读更多
Android.View.InflateException: Binary XML File Line #异常的解决

可能两种原因引起:

原因一:
   必须实现三个构造函数
    public GalleryFlow(Context context) {
            super(context);
    }

    public GalleryFlow(Context context, AttributeSet attrs) {
            super(context, attrs);
    }

    public GalleryFlow(Context context, AttributeSet attrs, int defStyle) {
            super(context, attrs, defStyle);
    }
原因二:
   或者XML中包错!
   <com.yourpackege.yourLayout
          android:id="@+id/name"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:background="@color/transparent"/>
   中yourLayout这个类不在com.yourpackege中。
分享到:
评论

相关推荐

    PhoneGap Cordova 3 3配置demo

    另外又由于官网的文档漏洞百出 一直报:java lang RuntimeException:Unable to start activity ComponeInfo{com }:android view InflateException:Binary XML file line #8:Erroe inflating class org apache ...

    Fragment两种

    android.view.InflateException: Binary XML file line #7: Error inflating class fragment异常 ( 2 ) android.support.v4.app.Fragment:可以兼容到1.6的版本,不能使用标签,需要在程序中通过add或者replace的...

    android实现常驻通知栏遇到的问题及解决办法

    11:34.923 6387-6387/xxx E/CrashReport: android.app.RemoteServiceException: Bad notification posted from package xxx: Couldn't inflate contentViewsandroid.view.InflateException: Binary XML file line #2...

    recyclerview-v7.zip

    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.deyi.deyijia/com.deyi.deyijia.activity.PinterestActivity}: android.view.InflateException: Binary XML file line #157: Error ...

    recyclerview-V7

    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.deyi.deyijia/com.deyi.deyijia.activity.PinterestActivity}: android.view.InflateException: Binary XML file line #157: Error ...

    google-play-services.jar

    google map v2中遇见xml里frment找不到问题 可以引入这个jar包就可以了 如Caused by: android.view.InflateException: Binary XML file line #3: Error inflating class fragment

    Android 兼容性问题:java.lang.UnsupportedOperationException解决办法

    android.view.InflateException: Binary XML file line #13: Error inflating class at android.view.LayoutInflater.createView(LayoutInflater.java:613) at com.android.internal.policy.impl.P

    Android实现在xml文件中引用自定义View的方法分析

    Java.lang.RuntimeException: Unable to start activity ComponentInfo{cm.test/cm.test.TestsActivity}:Android.view.InflateException: Binary XML file line #8: Error inflating class com.test.testview ...

    ERROR/AndroidRuntime(17121)的问题解决

    在layout文件中使用自定义的View时遇到如下错误: 12-11 17:28:26.962: ERROR/AndroidRuntime(17121): android.view.InflateException: Binary XML file line #6: Error inflating class fish.apps.ipcall.controls...

    解析android res 运行错误的问题

    其次,`android.view.InflateException: Binary XML file line #279: Error inflating class &lt;unknown&gt;` 异常通常出现在布局文件解析时,无法找到或实例化指定的视图类。这可能是因为以下原因: 1. **拼写错误或类名...

Global site tag (gtag.js) - Google Analytics