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>

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

相关推荐
阿pin10 小时前
Android随笔-kotlin withContext
android·kotlin·withcontext
树码小子11 小时前
开启 IDEA 中的断言功能
android·java·intellij-idea
Kslient11 小时前
HeaderBehavior
android
Android-Flutter12 小时前
android 动画详解
android·kotlin
小孔龙17 小时前
GraphicBuffer 跨进程共享
android
树码小子17 小时前
Pycharm解释器配置问题解决
ide·python·pycharm
行业研究员17 小时前
Android内置GPS与腾讯地图定位技术对比分析
android·android定位·腾讯地图定位
Android-Flutter18 小时前
android WMS 详解(二)
android·kotlin
游戏开发爱好者819 小时前
App Store 上传 IPA 自动化,.p8 密钥认证与 CI/CD 接入实战
android·运维·ci/cd·小程序·uni-app·自动化·iphone
FlyWIHTSKY19 小时前
idea中集成claude功能
java·ide·人工智能·intellij-idea·cloudera