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,图形化界面就可以正常显示了。如下图所示,

 

转载于:https://www.cnblogs.com/huanyou/p/5077862.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
What’s New in Version 8.12? For those of you who have read previous editions of this book, here are some of the highlights of what is new in the prose in Version 8.12. This update: • Adds more to the Android P coverage, including: ◦ A dedicated chapter on publising slices ◦ BiometricPrompt (as the replacement for FingerprintDialog, which itself replaces the now-deprecated FingerprintManager) ◦ AppComponentFactory ◦ WebView tracing ◦ New salvos in “the War on Background Processing” • Updates much of the book to cover Android Studio 3.1 • Added material on the 1.1 release of ConstraintLayout, including groups, barriers, percentage constraints, and circular constraints • Rewrote the fragments chapter to focus on the fragments backport • Updated most remaining samples to use the fragments backport, for those that were not doing so already • Converted some samples that were using ListView to use RecyclerView, and moved the RecyclerView chapter to be earlier in the book • Added some material on the Chrome OS emulator • Moved the material on SlidingPaneLayout to the Widget Catalog • Made minor improvements to the chapters on Espresso, unit testing, and Ui Automator • Retired the chapter on dynamic code, the chapter on Android Things, the chapter on SlidingDrawer (from the Widget Catalog), and the chapter on l PREFACE large screen strategies, as well as some other specific sample apps and their corresponding sections) • Fixes a variety of errata and other miscellaneous bugs

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值