2012-08-20 36 views
5
<LinearLayout 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"> 

    <LinearLayout 
     android:id="@+id/tab1" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent"> 

     <ScrollView 
      android:id="@+id/scrollView1" 
      android:layout_width="wrap_content" 
      android:layout_height="match_parent"> 

      <LinearLayout 
       android:layout_width="wrap_content" 
       android:layout_height="match_parent" 
       android:orientation="vertical"> 

       <TextView 
        android:id="@+id/textView1" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_gravity="center" 
        android:gravity="center" 
        android:text="About the course" 
        android:textColor="#0000ff" 
        android:textSize="20dp" /> 

       <TextView 
        android:id="@+id/textView2" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_marginTop="10dp" 
        android:text="This course equips you the skills to handle and manage the technology that is so vital in the field of media and communication, namely digital communication, wireless devices, broadband, media design and other emerging media and telecommunication technologies." 
        android:textColor="#0000ff" 
        android:textSize="14dp" /> 
       <ImageView 
        android:id="@+id/imageView1" 
        android:layout_width="214dp" 
        android:layout_height="171dp" 
        android:layout_marginTop="10dp" 
        android:adjustViewBounds="true" 
        android:padding="10dp" 
        android:scaleType="fitStart" 
        android:src="@drawable/cinema4d" 
        android:layout_gravity="center" /> 
       <TextView 
        android:id="@+id/textView3" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_marginTop="10dp" 
        android:textColor="#0000ff" 
        android:text="What you learn:" 
        android:textSize="14dp" /> 
       <TextView 
        android:id="@+id/textView4" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_marginTop="10dp" 
        android:textColor="#0000ff" 
        android:textSize="14dp" 
        android:text="Enrol in subjects on the fundamentals of media and communication technology and refine your specialisation by choosing elective subjects in areas such as multimedia networking and applications, wireless and mobile communications, and digital broadcasting with emphasis on a 'hands-on. minds-on' approach."/> 
       <ImageView 
        android:id="@+id/imageView1" 
        android:layout_width="214dp" 
        android:layout_height="171dp" 
        android:layout_marginTop="10dp" 
        android:adjustViewBounds="true" 
        android:padding="10dp" 
        android:scaleType="fitStart" 
        android:src="@drawable/fdmp" 
        android:layout_gravity="center" />     
     </ScrollView> 
    </LinearLayout>  
</LinearLayout> 

मेरा कोड ठीक था और मैंने कुछ बार परीक्षण किया और यह तब तक काम करता है जब तक एक्सएमएल मेल नहीं मिला त्रुटि में त्रुटि होती है और मुझे त्रुटि नहीं मिलती। जब मैं छवि दृश्य जोड़ता हूं तो निम्न त्रुटि प्रकट होती है जब मैं निर्माण करने का प्रयास करता हूं: इस पंक्ति पर कई एनोटेशन पाए जाते हैं: - त्रुटि: XML को पार्स करने में त्रुटि: मेल नहीं मिला टैग - तत्व प्रकार "लीनियरलाउट" को मिलान अंतराल द्वारा समाप्त किया जाना चाहिए- टैग ""। क्या कोई जानता है कि मेरे कोड में क्या गलत है? धन्यवादXML मिलान किए गए टैग को पार्स करने में त्रुटि

उत्तर

7

त्रुटि संदेश काफी सटीक है:

Multiple annotations found at this line: - error: Error parsing XML: mismatched tag - The element type "LinearLayout" must be terminated by the matching end-tag

आपका एक्सएमएल दो <LinearLayout> टैग (पहली पंक्ति पर एक, <ScrollView> के पहले तत्व के रूप में एक) को खोलता है, लेकिन यह केवल एक ही बंद कर देता है।

</ScrollView> से पहले इसे हल करना चाहिए।

+0

THX बहुत पहले मैं कि याद किया बाहर की जरूरत है। यह समस्या हल करता है – realityss

संबंधित मुद्दे