arimorty / floatingsearchview

A search view that implements a floating search bar also known as persistent search
https://github.com/arimorty/floatingsearchview/blob/master/README.md
Apache License 2.0
3.54k stars 667 forks source link

Crashing on LDPI devices #241

Open ozv101 opened 7 years ago

ozv101 commented 7 years ago

Getting this on two devices both are running 4.4.2.

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp/com.myapp.view.MainActivity}: android.view.InflateException: Binary XML file line #75: Error inflating class com.arlib.floatingsearchview.FloatingSearchView
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
       at android.app.ActivityThread.access$800(ActivityThread.java:135)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5017)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by android.view.InflateException: Binary XML file line #75: Error inflating class com.arlib.floatingsearchview.FloatingSearchView
       at android.view.LayoutInflater.createView(LayoutInflater.java:620)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
       at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292)
       at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
       at com.myapp.view.MainActivity.onCreate(MainActivity.java:136)
       at android.app.Activity.performCreate(Activity.java:5231)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
       at android.app.ActivityThread.access$800(ActivityThread.java:135)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5017)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by java.lang.reflect.InvocationTargetException
       at java.lang.reflect.Constructor.constructNative(Constructor.java)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
       at android.view.LayoutInflater.createView(LayoutInflater.java:594)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
       at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292)
       at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
       at com.myapp.view.MainActivity.onCreate(MainActivity.java:136)
       at android.app.Activity.performCreate(Activity.java:5231)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
       at android.app.ActivityThread.access$800(ActivityThread.java:135)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5017)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by android.view.InflateException: Binary XML file line #24: Error inflating class ImageView
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.parseInclude(LayoutInflater.java:839)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
       at android.view.View.inflate(View.java:17465)
       at com.arlib.floatingsearchview.FloatingSearchView.init(FloatingSearchView.java:341)
       at com.arlib.floatingsearchview.FloatingSearchView.<init>(FloatingSearchView.java:333)
       at java.lang.reflect.Constructor.constructNative(Constructor.java)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
       at android.view.LayoutInflater.createView(LayoutInflater.java:594)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
       at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292)
       at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
       at com.myapp.view.MainActivity.onCreate(MainActivity.java:136)
       at android.app.Activity.performCreate(Activity.java:5231)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
       at android.app.ActivityThread.access$800(ActivityThread.java:135)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5017)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by android.content.res.Resources$NotFoundException: File res/drawable/ic_arrow_back_black_24dp.xml from drawable resource ID #0x7f020075
       at android.content.res.Resources.loadDrawable(Resources.java:2096)
       at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
       at android.widget.ImageView.<init>(ImageView.java:129)
       at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:60)
       at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:56)
       at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:106)
       at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1029)
       at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1087)
       at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:47)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.parseInclude(LayoutInflater.java:839)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
       at android.view.View.inflate(View.java:17465)
       at com.arlib.floatingsearchview.FloatingSearchView.init(FloatingSearchView.java:341)
       at com.arlib.floatingsearchview.FloatingSearchView.<init>(FloatingSearchView.java:333)
       at java.lang.reflect.Constructor.constructNative(Constructor.java)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
       at android.view.LayoutInflater.createView(LayoutInflater.java:594)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
       at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292)
       at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
       at com.myapp.view.MainActivity.onCreate(MainActivity.java:136)
       at android.app.Activity.performCreate(Activity.java:5231)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
       at android.app.ActivityThread.access$800(ActivityThread.java:135)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5017)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by org.xmlpull.v1.XmlPullParserException: Binary XML file line #1: invalid drawable tag vector
       at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:933)
       at android.graphics.drawable.Drawable.createFromXml(Drawable.java:877)
       at android.content.res.Resources.loadDrawable(Resources.java:2092)
       at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
       at android.widget.ImageView.<init>(ImageView.java:129)
       at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:60)
       at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:56)
       at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:106)
       at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1029)
       at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1087)
       at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:47)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.parseInclude(LayoutInflater.java:839)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
       at android.view.View.inflate(View.java:17465)
       at com.arlib.floatingsearchview.FloatingSearchView.init(FloatingSearchView.java:341)
       at com.arlib.floatingsearchview.FloatingSearchView.<init>(FloatingSearchView.java:333)
       at java.lang.reflect.Constructor.constructNative(Constructor.java)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
       at android.view.LayoutInflater.createView(LayoutInflater.java:594)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
       at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292)
       at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
       at com.myapp.view.MainActivity.onCreate(MainActivity.java:136)
       at android.app.Activity.performCreate(Activity.java:5231)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
       at android.app.ActivityThread.access$800(ActivityThread.java:135)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5017)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
       at dalvik.system.NativeStart.main(NativeStart.java)
ozv101 commented 7 years ago

@arimorty looks like this is due to not supporting LDPI devices. can you please add the resources to drawable/ or create a drawable-ldpi-v4/ directory with all the required resources?

AleksandrKrasnoperov commented 5 years ago

You can put ic_clear_black_24dp to drawable-ldpi in your app module