user3871754 user3871754 - 6 months ago 26
Android Question

Iappcompat v21: material design ActionBar() InflateException error-inflating-class

Trying to move app made in (

appcompat v20
) to the new library
appcompat v21


with:
appcompat-v7:20
work nice

I did this:

ActionBarActivity implements ActionBar.TabListener, ActionBar.OnNavigationListener


and have this:

android.view.InflateException: Binary XML file line #17: Error inflating class android.support.v7.internal.widget.ActionBarOverlayLayout


Error inflating class android.support.v7.internal.widget.ActionBarView

Answer

The problem was much deeper than it seems.

My code was correct. All the advice in the subject relevant and correct.

It turned out that external libraries contain old versions support-v4, which does not support MATERIAL DESIGN(appcompat-v7:21) but only appcompat-v7:20

It was the reason for ActionBar() InflateException error-inflating-class.

Update support-v4 in all external libraries will solve the problem.

My build.gradle in other topic:

multiple dex files define Landroid/support/v4/.

Comments