现在的位置: 首页 > 综合 > 正文

error: Error parsing XML: unbound prefix 与 error: Invalid start tag LinearLayout 问题解决

2013年08月17日 ⁄ 综合 ⁄ 共 690字 ⁄ 字号 评论关闭

 在写android 程序时总会遇到此类问题 error: Error parsing XML: unbound prefix 和 error: Invalid start tag LinearLayout 错误.

第一个问题原来发现是android写错了,下面是我写错的xml文件.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  >
  <TextView 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/hello"
  />
  <Button
    android:id="@+id/myButton1"
    adnroid:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/str_button1"
  />
</LinearLayout>

很隐蔽:)

第二个问题是因为main.xml文件放错位置,汗.

下面是上传上来的图片,希望可以借鉴,避免此类问题的发生.

 

 

 

【上篇】
【下篇】

抱歉!评论已关闭.