gpt4 book ai didi

android - 创建穿戴应用程序 XML : AAPT: error: attribute android:boxedEdges not found 时面临问题

转载 作者:行者123 更新时间:2023-12-02 13:19:13 24 4
gpt4 key购买 nike

在下面的 XML 中,我收到了关于 android:boxedEdges="all" 的错误.我试图删除这条线但没有解决它。

我仍然收到 AAPT:错误:找不到属性 android:boxedEdges

 <?xml version="1.0" encoding="utf-8"?>
<androidx.wear.widget.BoxInsetLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/dark_grey"
android:padding="@dimen/box_inset_layout_padding"
tools:context=".MainActivity"
tools:deviceIds="wear">

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/inner_frame_layout_padding"
android:boxedEdges="all">

<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/hello_world" />

<Button
android:layout_width="wrap_content"
android:layout_gravity="center"
android:layout_height="wrap_content"
android:text="Press Here" />

</FrameLayout>
</androidx.wear.widget.BoxInsetLayout>

这是一个简单的 Wear OS 项目。我是新手,因此任何帮助或链接都会不胜感激。

最佳答案

app:boxedEdges ,而不是 android:boxedEdges根据 BoxInsetLayout documentation .

关于android - 创建穿戴应用程序 XML : AAPT: error: attribute android:boxedEdges not found 时面临问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60313809/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com