Android Studio报错: This item may not have a label readable by screen readers

Android Studio报错: This item may not have a label readable by screen readers

报错信息:

Solution:

java 复制代码
//1. 在LinearLayout 中添加代码
xmlns:tools="http://schemas.android.com/tools"
//2. 在Button中添加代码
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck"    
xml-dtd 复制代码
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#EEEEEE"
    android:orientation="vertical"
    android:padding="5dp"
    tools:context=".CalculatorActivity">

<Button
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/background"
    tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck">
</Button>

如果对你有帮助,就一键三连呗(点赞+收藏+关注),我会持续更新更多干货~~

相关推荐
scan7248 小时前
长期记忆存储在数据库里
android
xingpanvip8 小时前
星盘接口开发文档:星相日历接口指南
android·开发语言·前端·css·php·lua
AI进化营-智能译站10 小时前
Jazzy ROS2入门指南系列05-配置VsCode实现ROS2项目开发
ide·vscode·ai·编辑器
儿歌八万首11 小时前
Jetpack Compose 实战:实现一个动态平滑折线图
android·折线图·compose
李艺为15 小时前
Fake Device Test作假屏幕分辨率分析
android·java
zh_xuan15 小时前
github远程library仓库升级
android·github
峥嵘life15 小时前
Android蓝牙停用绝对音量原理
android
EvenBoy15 小时前
IDEA中使用CodeX
java·ide·intellij-idea
时光之源15 小时前
Visual Studio | Marketplace创建发布者(Create Publisher)时无法创建的问题解决方案
ide·vscode·visual studio·plugin·cursor
czlczl2002092516 小时前
IN和BETWEEN在索引效能的区别
android·adb