Comments (22)
02-20 14:16:38.229 16567-16567/com.wyys.seller E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.wyys.seller, PID: 16567
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.wyys.seller/com.wyys.seller.ProvingActivity}: android.view.InflateException: Binary XML file line #29: Error inflating class me.yokeyword.indexablerv.IndexableLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2342)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2404)
at android.app.ActivityThread.access$800(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1315)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5290)
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:911)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:706)
Caused by: android.view.InflateException: Binary XML file line #29: Error inflating class me.yokeyword.indexablerv.IndexableLayout
at android.view.LayoutInflater.createView(LayoutInflater.java:637)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:747)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:810)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:813)
at android.view.LayoutInflater.inflate(LayoutInflater.java:508)
at android.view.LayoutInflater.inflate(LayoutInflater.java:418)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:249)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
at com.wyys.seller.ProvingActivity.onCreate(ProvingActivity.java:36)
at android.app.Activity.performCreate(Activity.java:6039)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2295)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2404)
at android.app.ActivityThread.access$800(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1315)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5290)
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:911)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:706)
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:611)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:747)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:810)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:813)
at android.view.LayoutInflater.inflate(LayoutInflater.java:508)
at android.view.LayoutInflater.inflate(LayoutInflater.java:418)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:249)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
at com.wyys.seller.ProvingActivity.onCreate(ProvingActivity.java:36)
at android.app.Activity.performCreate(Activity.java:6039)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2295)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2404)
at android.app.ActivityThread.access$800(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1315)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5290)
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:911)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:706)
Caused by: java.lang.NoSuchMethodError: No static method getColor(Landroid/content/Context;I)I in class Landroid/support/v4/content/ContextCompat; or its super classes (declaration of 'android.support.v4.content.ContextCompat' appears in /data/app/com.wyys.seller-1/base.apk)
at me.yokeyword.indexablerv.IndexableLayout.init(IndexableLayout.java:291)
at me.yokeyword.indexablerv.IndexableLayout.(IndexableLayout.java:116)
at me.yokeyword.indexablerv.IndexableLayout.(IndexableLayout.java:111)
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:611)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:747)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:810)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:813)
at android.view.LayoutInflater.inflate(LayoutInflater.java:508)
at android.view.LayoutInflater.inflate(LayoutInflater.java:418)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:249)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
at com.wyys.seller.ProvingActivity.onCreate(ProvingActivity.java:36)
at android.app.Activity.performCreate(Activity.java:6039)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2295)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2404)
at android.app.ActivityThread.access$800(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1315)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5290)
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:911)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:706)
from indexablerecyclerview.
求解答
from indexablerecyclerview.
ComponentInfo{com.wyys.seller/com.wyys.seller.ProvingActivity}: android.view.InflateException: Binary XML file line #29: Error inflating class me.yokeyword.indexablerv.IndexableLayout
ProvingActivity的xml布局代码贴一下
from indexablerecyclerview.
就是你那个代码沾过去的
from indexablerecyclerview.
Demo看下能跑吗? 能跑的话仔细检查下代码~
from indexablerecyclerview.
demo能跑弄到自己的项目里不好使
from indexablerecyclerview.
你那个pickactivity我可以放到fragment里,我的底部切换时4个fragment
from indexablerecyclerview.
还有那个sdk版本我感觉那个可能太高,v4v7的libs我的好像放不了那么高,我用httpclient解析的最高到5.1,你那是6.0的么
from indexablerecyclerview.
建议仔细检查下XML的29行附近 或者贴代码; 和SDK应该没关系的
from indexablerecyclerview.
<android.support.v7.widget.SearchView
android:id="@+id/searchview"
android:layout_width="match_parent"
android:layout_height="42dp"
android:layout_marginBottom="4dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp"
android:background="#f3f3f3"
android:focusable="false"
android:focusableInTouchMode="false"
android:textColor="#757575"
app:iconifiedByDefault="false"
app:queryBackground="@null"
app:queryHint="请输入关键字"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<me.yokeyword.indexablerv.IndexableLayout
android:id="@+id/indexableLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:indexBar_background="#08000000"
app:indexBar_layout_width="24dp"
app:indexBar_textColor="@android:color/black"
app:indexBar_textSpace="8dp"/>
<fragment
android:id="@+id/search_fragment"
class="me.yokeyword.sample.city.SearchFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<FrameLayout
android:id="@+id/progress"
android:layout_width="match_parent"
android:background="@android:color/white"
android:layout_height="match_parent">
<ProgressBar
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_gravity="center"/>
</FrameLayout>
</FrameLayout>
from indexablerecyclerview.
标签里的class="me.yokeyword.sample.city.SearchFragment"
这个Fragment你没有这个类吧, 要写你自己的Fragment类
from indexablerecyclerview.
我是先粘的你的,难道不好使么
from indexablerecyclerview.
我的是Demo。。。。 实际情况当然按照README来集成
标签里的name, class属性 需要填写项目中存在的类名
from indexablerecyclerview.
那个我知道,都根据我的实际项目改的,
from indexablerecyclerview.
但是他就是不好使
from indexablerecyclerview.
就是正常按自己的项目改掉能改的类和名也应该好使啊
from indexablerecyclerview.
你的改了就一点就蹦报错了
from indexablerecyclerview.
最终...找到原因了吗? 是class名的问题吗? 复制粘贴少用,那个是Demo,和你场景可能不同,自己集成下
from indexablerecyclerview.
改不了你的,
from indexablerecyclerview.
用别人的了
from indexablerecyclerview.
那个有点不妥
from indexablerecyclerview.
OK
from indexablerecyclerview.
Related Issues (20)
- 能否提供api外部直接设置索引Bar数据
- setDatas 时能不刷新 header吗?
- 土耳其语言首字母为I的识别出来不是i,希望作者能修复下。
- 1.3.0引入了重复的tinypinyin-android库(这个库没有被用到,工程里应该在sample project引入,而不是在lib里引入),而且PinyinUtil里面引入了的com.github.promeg.pinyinhelper.Pinyin更新不下来 HOT 1
- notifyItemChanged 能否暴漏出来
- 一个很离奇的XML崩溃报错 HOT 1
- 关于 拼音库【 TinyPinyin 】 依赖问题,可以参考下
- 滑动后 字母吸顶不显示 是什么鬼 HOT 1
- 请问 布局item上添加button按钮 点击请求网络 如何拿到当前item的信息作为参数上传?
- 请问怎么获取右侧indexbar
- 默认没有按照首字母排序
- jcenter跑路啦,有迁移计划吗 HOT 1
- 想要在适配器中获取元素的下标 position,怎么操作?
- 1.30版本 刷新方法被注释
- 大神,拼音的jar包有时候根本依赖不下来啊
- 热门和 定位顺序问题
- 无法滑动,我使用的是LinearLayoutManager HOT 1
- tinypinyin.lexicons 依赖冲突 HOT 4
- 关于header定制不灵活的建议
- 可以隐藏没有数据的 索引么
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from indexablerecyclerview.