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>

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

相关推荐
Kapaseker14 小时前
Compose 进阶—巧用 GraphicsLayer
android·kotlin
黄林晴15 小时前
Android17 为什么重写 MessageQueue
android
阿巴斯甜1 天前
Android 报错:Zip file '/Users/lyy/develop/repoAndroidLapp/l-app-android-ble/app/bu
android
Kapaseker2 天前
实战 Compose 中的 IntrinsicSize
android·kotlin
xq95272 天前
Andorid Google 登录接入文档
android
黄林晴2 天前
告别 Modifier 地狱,Compose 样式系统要变天了
android·android jetpack
冬奇Lab2 天前
Android触摸事件分发、手势识别与输入优化实战
android·源码阅读
城东米粉儿2 天前
Android MediaPlayer 笔记
android
Jony_2 天前
Android 启动优化方案
android
阿巴斯甜2 天前
Android studio 报错:Cause: error=86, Bad CPU type in executable
android