NoSuchMethodError:android.support.v4.view.ViewCompat.isAttachedToWindow用于前Lollipop设备

时间:2015-11-24 20:09:59

标签: android

当我在Lollipop之前的设备上启动我的应用程序时,我收到此错误并且应用程序崩溃(在Lollipop上该应用程序正常工作):

NoSuchMethodError: android.support.v4.view.ViewCompat.isAttachedToWindow

在我的布局中,我使用:

DrawerLayoutandroid.support.v4.widget.DrawerLayout

Toolbarandroid.support.v7.widget.Toolbar

ViewPagerandroid.support.v4.view.ViewPager

PagerTabStripandroid.support.v4.view.PagerTabStrip

FloatingActionButtonandroid.support.design.widget.FloatingActionButton)。

在build.gradle(Module:app)文件中,我有: 依赖性{

compile ('com.android.support:cardview-v7:22.2.0') {
    exclude module: 'support-v4' }
compile ('com.android.support:recyclerview-v7:22.2.0') {
    exclude module: 'support-v4' }
compile ('com.android.support:design:22.2.0') {
    exclude module: 'support-v4' }
compile ('com.android.support:support-v4:22.1.1')

...

在Project窗口中,我可以看到以下外部库: https://drive.google.com/file/d/0B7p0FSMdyvwAdGwyNmVha2M0SWs/view?usp=sharing

0 个答案:

没有答案