问题描述
出错代码如下:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffffff"
>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
>
在第二个LinearLayout 的 xmlns:android=”http://schemas.android.com/apk/res/android”出错
解决方法
去掉 第二个”xmlns:android=”http://schemas.android.com/apk/res/android”
本文介绍了一个关于Android布局文件中重复定义xmlns:android属性的问题,并提供了解决方案。问题出现在第二个LinearLayout元素内重复声明了相同的命名空间,解决方法是移除多余的xmlns:android属性。
1万+

被折叠的 条评论
为什么被折叠?



