2012-02-05 2 views
-2

나는 오랫동안 오류를 찾고 있었지만 찾지 못했습니다. 아래 코드에서 오류를 표시했습니다. 아무도 그것을 설명 할 수 있습니까? 안드로이드 XML 파일에 문제가 있습니까?

<TableLayout 
     android:id = "@+id/TableLayout01" 
     android:layout_width = "wrap_content" 
     android:layout_height = "wrap_content> 

     <TableRow>   <==Here eclipse marks an error 
      <TextView 
       android:id = "@+id/TextView01" 
       android:layout_widht = "wrap_content" 
       android:layout_height = "wrap_content" 
       android:text = "User:" /> 
      <EditText 
       android:id = "@+id/EditText01" 
       android:text = "admin" 
       android:layout_width = "fill_parent" 
       android:scrollHorizontally="true" /> 
     </TableRow> 
    </TableLayout> 

</LinearLayout> 

내가 가지고 오류 :

Error generating final archive: java.io.FileNotFoundException:/home/lubuntu/workspace/MainListener/bin/resources.ap_ does not exist 
error: Error parsing XML: not well-formed (invalid token) 
The value of attribute "android:layout_height" associated with an element type "TableLayout" must not contain the '<' character. 

답변

5

오류가 당신에게 꽤 정확하게 문제를 알려줍니다

The value of attribute "android:layout_height" associated with an element type "TableLayout" must not contain the '<' character.

을 당신이 보는 경우에, 당신은 누락 된 인용이 볼 수 있습니다 :

<TableLayout 
     android:id = "@+id/TableLayout01" 
     android:layout_width = "wrap_content" 
     android:layout_height = "wrap_content> <==== MISSING A QUOTE! 

     <TableRow>   <==Here eclipse marks an error 
      <TextView 
       android:id = "@+id/TextView01" 
       android:layout_widht = "wrap_content" 
       android:layout_height = "wrap_content" 
       android:text = "User:" /> 
      <EditText 
       android:id = "@+id/EditText01" 
       android:text = "admin" 
       android:layout_width = "fill_parent" 
       android:scrollHorizontally="true" /> 
     </TableRow> 
    </TableLayout> 

</LinearLayout> 
+0

죄송 합니다만, 나는 실수로''< '문자'를 발견했습니다. "너비"의 철자에도 오류가 있습니다. 이제 모든 것이 잘됩니다. – Searene

+0

@ 마크 자르 때때로 우리 모두에게 일어납니다. :) – Jonathan

관련 문제