Android报错:Error: Can't determine type for tag 错误:无法确定标记的类型

本文详细解析了在Android开发中遇到的布局加载错误问题,特别是因莫名出现的layout_find文件夹引发的错误。通过理解错误信息,明确了问题的根源,并提供了解决方案,即检查并删除或移动该文件夹下的文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

报错信息:

D:\Exercise\Android_text\Andriod_Practice\app\src\main\res\layout_find\find_dialect.xml: Error: Can't determine type for tag '<LinearLayout android:layout_height="match_parent" android:layout_width="match_parent" android:orientation="vertical">

<RelativeLayout android:background="@drawable/find_game" android:id="@+id/find_game" style="@style/find_main_style">

<TextView android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="游戏" android:textColor="@color/white" android:textSize="30sp"/>
</RelativeLayout>

<RelativeLayout android:background="@drawable/find_study" android:id="@+id/find_study" style="@style/find_main_style">

<TextView android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="学习" android:textColor="@color/white" android:textSize="30sp"/>
</RelativeLayout>

<RelativeLayout android:background="@drawable/find_moive" android:id="@+id/find_moive" style="@style/find_main_style">

<TextView android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="电影、视频" android:textColor="@color/white" android:textSize="30sp"/>
</RelativeLayout>

<RelativeLayout android:background="@drawable/find_class" android:id="@+id/find_class" style="@style/find_main_style">

<TextView android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="课程" android:textColor="@color/white" android:textSize="30sp"/>
</RelativeLayout>
</LinearLayout>'

 

产生原因:合并代码时,莫名奇妙的出现了一个文件夹layout_find,导致布局加载错误

解决方法:删除该文件夹【删除前检查一下里面的文件有没有用,如果有用,则把文件放到layout文件夹下】

转载于:https://www.cnblogs.com/hahayixiao/p/11355394.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值