layout图形化界面看不到内容 Failed to find the style corresponding to the id

 

1、问题

在创建新的工程的时候,选择目标SDK为api21,编译SDK为api23。创建出来的layout文件图形化界面中看不到,并且报错:

Failed to find the style corresponding to the id 2130772026
Failed to find the style corresponding to the id 2130771996
java.lang.NullPointerException
Exception details are logged in Window > Show View > Error Log
The following classes could not be instantiated:
- android.support.v7.internal.app.WindowDecorActionBar (Open Class, Show Error Log)
See the Error Log (Window > Show View) for more details.

 

2、解决方法

上网搜索发现解决方法,修改图形化中的api,改为低版本即可。如图所示:

 

3、解决方法(随后的测试发现,新建工程的时候,还是会有问题,只有重启Eclipse之后才能正常,这种方法还是不能解决根本问题)

通过上面的解决方法分析,估计问题应该出在SDK版本上。查看了一下SDK Manager,发现在创建工程时候选择的编译api在本地没有下载,将对应的编译工具下载后,重启eclipse,图形化界面就可以正常显示了。如下图所示,

 

posted @ 2015-12-26 12:06  环游世界  阅读(1987)  评论(0编辑  收藏  举报