NavigationView Error While Running an App on a Device

I met NavigationView Error while running my app on a device (API 19).

Error inflating class android.support.design.widget.NavigationView

It worked well on emulator. Error log showed details like this.

android.view.InflateException: Binary XML file line #11: Error inflating class android.support.design.widget.NavigationView

android.content.res.Resources$NotFoundException: File res/drawable/bg_nav.xml from drawable resource ID #0x7f020046

Finally, I found a solution. (But, I don’t know the exact reason…)\
My resources were only in drawable-v21 and I copied them to drawable.
(https://stackoverflow.com/questions/30709419/error-inflating-class-android-support-design-widget-navigationview)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s