0

私は次のxmlを持つアプリケーションに取り組んでいます。しかし、プロジェクトをクリーン/ビルドしようとすると、次のエラーが発生します:

エラー:

Error parsing XML: not well-formed (invalid token)
android:text" associated with an element type "TextView" must not contain the '<' character

レイアウト:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/Hola!_Això_és_una_proba_per_el_treball_de_recerca"        
</RelativeLayout>

ありがとう!

4

3 に答える 3

0

閉じない<TextViewので<、ルート終了タグから が の一部として表示されますandroid:textTextViewでタグを閉じます/>

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/Hola!_Això_és_una_proba_per_el_treball_de_recerca"/>

これを行った後、プロジェクトをクリーンアップして再度実行する必要がある場合があります。エクリプスで

プロジェクト --> クリーン...

于 2013-11-07T19:53:29.400 に答える