Failed to find style 'editTextStyle' in current theme解决办法

本文解决Android开发中TextView、EditText及Button样式找不到的问题。通过更改布局预览界面的主题设置即可修复错误,具体步骤包括选择Theme选项并设为Theme.black。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

网上已经有解决办法了,这里我只是把它用图文的方式写一下。
请参考 http://blog.youkuaiyun.com/romaticxiaoyu/article/details/7241512
据说这几个错误都可以
Failed to find style 'textViewStyle' in current theme
Failed to find style 'editTextStyle' in current theme
Failed to find style 'buttonStyle' in current theme

现象:

[img]http://dl2.iteye.com/upload/attachment/0100/9268/65cc59a3-d64e-3658-8743-1f7f24d12ea8.png[/img]

图文解决办法:
layout预览界面(Graphic Layout),右上角有个Theme的选择项,默认为notitle,根据喜好随意设定值,我们这里设定为android以前默认的Theme.black.

第一步

[img]http://dl2.iteye.com/upload/attachment/0100/9270/3e074999-a53d-3361-b559-1882425a482e.jpg[/img]
第二步
[img]http://dl2.iteye.com/upload/attachment/0100/9272/6e6cfe7c-5ef8-3d89-9cbe-30daac060564.jpg[/img]
成功了

[img]http://dl2.iteye.com/upload/attachment/0100/9274/6c59025b-7be5-33d0-bd68-32a917a66b83.png[/img]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值