This error showed up after I started on my app and had a couple Activities running. I had been using a Galaxy S8 running 8.0 and build and testing would work fine. I then grabbed my old HTC One m7 running Lollipop 5.1 (21) and wanted to test the app some on it. Android Studio builds like it had been doing and then the app crashes after install on the m7 with this error.
I clicked on the link in the log and it took me to my MainActivity and the following line:
I then thought to myself, what? That was auto generated code when making the app. Then in the log there was this:
So after moving the image files to the non-v24 drawable folder, the app ran fine on the older phone running 5.1
Hope this helps someone new to android app development as I am.
Unable to start activity ComponentInfo{.MainActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class ImageButton
I thought to myself, ImageButton? not loading on android? this can't be an issue for real.I clicked on the link in the log and it took me to my MainActivity and the following line:
I then thought to myself, what? That was auto generated code when making the app. Then in the log there was this:
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f07005d
It took me a little time to realize that I had put the images for the ImageButton into the drawable-v24 folder and since running below 24, it wasn't able to find the drawable files to load the ImageButtons.Hope this helps someone new to android app development as I am.

