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>

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

相关推荐
Lei活在当下21 小时前
【Perfetto从入门到精通】4.使用 heapprofd 工具采样追踪 Java/Native 内存分配
android·性能优化·架构
alexhilton1 天前
学会在Jetpack Compose中加载Lottie动画资源
android·kotlin·android jetpack
ljh5746491191 天前
PhpStorm 2022.3 版本中,修改使用 Git 提交时看到弹出式的对话框模式
ide·git·php·phpstorm
summerkissyou19871 天前
Android-Camera-为啥不移到packages/module
android·相机
liang_jy1 天前
Android UID
android·面试
前端无涯1 天前
Trae的使用
前端·ide·trae
nono牛1 天前
安卓/MTK平台日志关键词详解
android
TimeFine1 天前
Android AI解放生产力(四)实战:解放绘制UI的繁琐工作
android
sheji34161 天前
【开题答辩全过程】以 基于Android的社区车位共享管理系统的设计与实现为例,包含答辩的问题和答案
android
TimeFine1 天前
Android AI解放生产力(三):认识custom_prompts和skills
android