2014-01-25 22 views
0

在android應用程序中爲customdialog創建我的.xml文件時出現此錯誤。爲線性佈局找到意外的命名空間前綴「xmlns」

意外的命名空間前綴 「的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> 

請儘快幫忙!

+0

你試過刪除** xmlns:**你已經給它在開始 – insomniac

回答

0

在XML中的這一點上,您已經在第一個xmlns:android定義的範圍內。你不應該再次定義它。只要刪除第二個定義,你就會好起來的。

2

刪除你已經打上星行:

**xmlns:android="http://schemas.android.com/apk/res/android">** 

(當然,你必須保持>

該標籤的xmlns只應包括在最外層容器。

+0

thanx隊友偉大:) –

+0

你'歡迎;) –

相關問題