您的位置:首页 > 移动开发 > Android开发

【Android studio】Rendering Problems:classes could not be instantiated 解决方法

2015-10-25 17:50 417 查看
Rendering Problems

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  at android.view.LayoutInflater.inflate(LayoutInflater.java:482)   

at android.view.LayoutInflater.inflate(LayoutInflater.java:414)   

at com.android.layoutlib.bridge.bars.BridgeActionBar.<init>(BridgeActionBar.java:84)   

at com.android.layoutlib.bridge.bars.AppCompatActionBar.<init>(AppCompatActionBar.java:56)

解决办法:

将styles.xml  中的

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">

修改为:

<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">

在theme前面加上了一个base,即可解决!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  android ide class 缓存