I know there are other questions on SO asking the same thing. I have already looked at most of them.
Most answers call about memory errors. I can\'t see how an
binary xml file line #0: error inflating class imageview
you have to see if your image has become drawable-v23 or v24 which might be higher than your mobile os level, Make sure to avoid creating drawable version image in project
example In drawable folder ~> "ic_contact(v24)"
using android.support.v7.widget.AppCompatImageView
without android:background
solved the problem for me.
The following code might be added in Android Manifests-Activity
<activity
android:name=""
--------------
android:theme="@android:style/Theme.Black.NoTitleBar">
</activity>
please remove this theme if you have added.
My problem has been solved after removing this theme. I got these solution after long time.
I had the same problem. The png image for my imageView was causing a class inflateException. This was only happening with my phone running android 6.0.1, but not in my phone running android 7.0. To solve this:
---In Android Studio---
If you are using vector drawables, use
app:srcCompat="@drawable/ic_dot"
instead of
android:src="@drawable/ic_dot"
Don't paste your image into drawable in Android studio, paste it into the drawable folder and clean the project and then run it will work.