My application was running fine but then I got the error and tried to re run the API, clean the build but nothing worked. When lookied into the logcat error found two errors with which I could find a solution for. The following are the errors.
11-08 21:50:09.981: ERROR/AndroidRuntime(352): Caused by: java.lang.ClassNotFoundException: android.view.Relativelayout in loader dalvik.system.PathClassLoader[/data/app/com.examples-1.apk]
11-08 21:50:09.981: ERROR/AndroidRuntime(352): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class Relativelayout
The following is the contents of my class:
public class Vathiyar extends Activity{
private Button findvathiyar;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.vathiyar);
}
}
Following is my xml code..
<?xml version="1.0" encoding="utf-8"?>
<Relativelayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/vathiyar_1"
android:orientation = "vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:id="@+id/widget32"
android:layout_width="wrap_content"
android:layout_height="-11px"
android:text="Welcome to the Selection of Vathiyar page"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
>
</TextView>
</Relativelayout>
Your problem is in your XML. You have RelativeLayout spelled incorrectly.
Change:
To: