iappcompat v21:材料设计ActionBar()InflateException错误膨胀类 [英] Iappcompat v21: material design ActionBar() InflateException error-inflating-class
问题描述
试图将(appcompat v20
)中制作的应用程序移动到新库appcompat v21
Trying to move app made in (appcompat v20
) to the new library appcompat v21
具有:appcompat-v7:20
工作正常
我这样做了:
ActionBarActivity implements ActionBar.TabListener, ActionBar.OnNavigationListener
并拥有这个:
android.view.InflateException: Binary XML file line #17: Error inflating class android.support.v7.internal.widget.ActionBarOverlayLayout
错误膨胀了类android.support.v7.internal. widget.ActionBarView
推荐答案
问题比看起来的要深得多.
The problem was much deeper than it seems.
我的代码是正确的.该主题中的所有建议都相关且正确.
My code was correct. All the advice in the subject relevant and correct.
事实证明,外部库包含旧版本support-v4
,该版本不支持 MATERIAL DESIGN(appcompat-v7:21)
,但仅appcompat-v7:20
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
这是ActionBar() InflateException error-inflating-class.
更新support-v4
即可解决该问题.
我在其他主题中的build.gradle:
My build.gradle in other topic:
多个dex文件定义了Landroid/support/v4/.
这篇关于iappcompat v21:材料设计ActionBar()InflateException错误膨胀类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!