更新到Android工作室1.2.1.1之后,我创建了一个新的新的空白项目,并创建了一个layout.xml
After updating to Android Studio 1.2.1.1, I created a new fresh blank project and created a layout.xml
在创建后不久,我决定看看preVIEW。我走进去,我看到这样的:
Shortly after creation, I decided to look at the preview. I went in and I saw this:
以下类不能被实例化: - android.support.v7.internal.widget.ActionBarOverlayLayout(公开课,显示异常,清除缓存)提示:使用View.isInEditMode()的 您的自定义视图跳过code或者当显示显示样本数据 IDE异常详细信息java.lang.NoClassDefFoundError的:无法 初始化类 android.support.v7.internal.widget.ActionBarOverlayLayout在 java.lang.reflect.Constructor.newInstance(Constructor.java:408)在 android.view.LayoutInflater.inflate(LayoutInflater.java:482)在 android.view.LayoutInflater.inflate(LayoutInflater.java:414)在 com.android.layoutlib.bridge.bars.BridgeActionBar(BridgeActionBar.java:84) 在 com.android.layoutlib.bridge.bars.AppCompatActionBar(AppCompatActionBar.java:56) 复制堆栈到剪贴板
The following classes could not be instantiated: - android.support.v7.internal.widget.ActionBarOverlayLayout (Open Class, Show Exception, Clear Cache) Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE Exception Details java.lang.NoClassDefFoundError: Could not initialize class android.support.v7.internal.widget.ActionBarOverlayLayout at java.lang.reflect.Constructor.newInstance(Constructor.java:408) at android.view.LayoutInflater.inflate(LayoutInflater.java:482) at android.view.LayoutInflater.inflate(LayoutInflater.java:414) at com.android.layoutlib.bridge.bars.BridgeActionBar.(BridgeActionBar.java:84) at com.android.layoutlib.bridge.bars.AppCompatActionBar.(AppCompatActionBar.java:56) Copy stack to clipboard
我以前从来没有见过它,我从来没有遇到过。 任何人有任何想法如何解决这一问题?
I have never seen it before and I had never encountered it before. Anyone have any idea how to fix this?
编辑:
有人向我推荐了this的位置,但没有奏效。它只是给我带来了 NullPointerException异常
。
Someone Recommended me this location but it didn't work. It only brought me NullPointerExceptions
.
我试图重建项目,但没有奏效。
I tried rebuilding the project but it didn't work.
似乎是一个错误。解决方法是从基本
主题在你的 styles.xml
继承:
Seems to be a bug. Workaround is to inherit from the Base
theme in your styles.xml
:
<style name="AppTheme" parent="Base.Theme.AppCompat.Light"/>