【发布时间】:2014-02-16 09:43:13
【问题描述】:
我在为 android 应用程序中的 customdialog 创建 .xml 文件时遇到此错误。
为标签线性布局找到了意外的命名空间前缀“xmlns”
这是我的代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_gravity="center"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView
...
<ScrollView
...
<LinearLayout
...
**xmlns:android="http://schemas.android.com/apk/res/android">**
<Button
...
<Button
...
<Button
...
</LinearLayout>
</LinearLayout>
【问题讨论】:
-
你有没有试过删除 xmlns:android="schemas.android.com/apk/res/android"> 你一开始就给了它
标签: java android xml android-linearlayout xml-namespaces