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>

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

相关推荐
91刘仁德3 小时前
MYSQL 事务原理及使用
android·mysql·adb
一笑的小酒馆5 小时前
AndroidKMP之瀑布流实现
android
RainyJiang5 小时前
AI时代下,Android的边界正在消失
android·openai·ai编程
2601_962294615 小时前
Python开发工具哪个好?Python开发工具推荐
ide·文本编辑器·游戏开发·编程语言·python开发工具
Android-Flutter5 小时前
android 内存抖动详解
android
方白羽7 小时前
为什么 Android 非要用 Intent 传值?
android·ios·harmonyos
方白羽9 小时前
Android17 重写 MessageQueue,解决 Handler 隐性卡顿
android·app
蜡台10 小时前
Kotlin 零基础完整版实战教程|从语法入门到Android工程实战
android·开发语言·kotlin
律宏阔10 小时前
Android 车载 USB 开发笔记:USB Host、USB 串口、USB-CAN、HID 与系统 API
android
律宏阔11 小时前
Android 车载串口开发笔记:UART、RS232、RS485、串口配置与数据通信
android