I get the following exception in Android when clicking a button to take me from an activity to another (I\'m new in Android development, so it may not be the brightest of qu
I received this error when my main activity.xml did not have the include statement to my content.xml file.
Once i added these lines back into my main activity.xml file, everything was fine again.
<include
android:id="@+id/editText"
layout="@layout/content" />
android:id="@+id/editCustomerPhone"
remove this line
from below tag
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/editCustomerPhone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/background_dark"
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=".CustomerInfoActivity" >
you have set it twice. One for relative layout one for edittext
you code says :
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/editCustomerPhone"
editCustomerPhone
is a relativelayout.