ClassCastException:android.widget.LinearLayout $ LayoutParams无法强制转换为com.android.internal.widget.ActionBarOverlayLayout $ LayoutParams

我已将Eclipse项目转换为Android Studio项目,当我运行应用程序时,我得到以下exception:

java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to com.android.internal.widget.ActionBarOverlayLayout$LayoutParams at com.android.internal.widget.ActionBarOverlayLayout.applyInsets(ActionBarOverlayLayout.java:172) at com.android.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:317) at android.view.View.measure(View.java:16497) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2291) at android.view.View.measure(View.java:16497) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1912) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1109) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1291) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:996) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5600) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761) at android.view.Choreographer.doCallbacks(Choreographer.java:574) at android.view.Choreographer.doFrame(Choreographer.java:544) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5001) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) at dalvik.system.NativeStart.main(Native Method) 

我的主题是:

    false true @color/primary @color/primary_dark @color/accent @color/primary_text  

我的Activity正在扩展AppCompactActivity ,它的布局是:

       <!--  -->               

请注意,在阅读此SO主题后,我在主题中包含了以下项目

 false true 

该项目具有以下依赖项:

 dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.github.navasmdc:MaterialDesign:1.+@aar' compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:cardview-v7:22.1.1' compile 'com.android.support:appcompat-v7:22.1.1' compile 'com.wrapp.floatlabelededittext:library:0.0.6' compile 'com.android.support:recyclerview-v7:22.1.1' compile 'com.github.flavienlaurent.datetimepicker:library:0.0.2' compile('com.mikepenz.materialdrawer:library:2.9.1@aar') { transitive = true } compile 'com.google.android.gms:play-services:7.0.0' compile 'com.anjlab.android.iab.v3:library:1.0.+@aar' compile 'com.github.alamkanak:android-week-view:1.2.1' compile 'com.github.johnkil.android-robototextview:robototextview:2.4.0' // AboutLibraries Library compile('com.mikepenz.aboutlibraries:library:4.7.2@aar') { transitive = true } // ChangeLog Libraries compile 'com.github.gabrielemariotti.changeloglib:library:1.5.2' compile files('libs/universal-image-loader-1.9.3-with-sources.jar') compile 'de.greenrobot:eventbus:2.4.0' compile 'com.twotoasters.SectionCursorAdapter:library:1.0.+' compile 'com.larswerkman:HoloColorPicker:1.5' compile('com.crashlytics.sdk.android:crashlytics:2.2.3@aar') { transitive = true; } } 

我面临着同样的问题,我改变了自己的风格并且解决了问题。

之前

   

   

我的NoActionBar主题是