Android-Learner
Android-Learner

Reputation: 41

Getting Error in android's XML file

Exception raised during rendering: String index out of range: 0 Exception details are logged in Window > Show View > Error Log The following classes could not be found: - TextView (Change to android.widget.TextView, Fix Build Path, Edit XML)

Getting this Error when i open graphic layout of XML file. Help me in resolving this. 

Upvotes: 1

Views: 867

Answers (2)

Mike Clark
Mike Clark

Reputation: 1870

You're using Button's background as: android:background="@layout/button_style"

What is button_style? If it's a style, shift the code to styles.xml or if it is a selector then move it to drawables. Same goes for tableleftborder in TextView.

Secondly, add android:textStyle="normal" in your First TextView OR simply remove it to make it something like the following:

       <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        android:text="UGD Demand Details"
        android:textColor="#FFF"
        android:textSize="20sp"/>

Hope it helps :)

Upvotes: 2

Dominic D&#39;Souza
Dominic D&#39;Souza

Reputation: 981

The first textView in the Header RelativeLayout has a android:textStyle="" also the RelativeLayout inside the scrollView has android:height="match_parent" this should be "wrap_content"

Upvotes: 0

Related Questions