I've tried so many solutions I've about given up with it. I'm getting two xml parsing errors that keep popping up after cleaning the project, making a new project, or re-importing the project. Nothing seems to work. It has to do with the layout xml and some data binding xml of the same name but it just keeps loading the data binding xml that's in the build folder and it seems a debug location and giving me the errors.
Here's my layout xml:
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable name="user" type ="com.example.chave.utclinicalnursing.signUpActivity"/>
</data>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_sign_up"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
tools:context="com.example.chave.utclinicalnursing.signUpActivity"
android:background="#11336A"
android:weightSum="1">
<LinearLayout
android:layout_width="381dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:id="@+id/titleView"
android:layout_weight="0.04"
android:layout_marginTop="30dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/fNameTitle"
android:text="First Name"
android:textColor="#ffffff"
android:textSize="18sp"
android:layout_marginRight="85dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/lNameTitle"
android:text="Last Name"
android:textColor="#ffffff"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:layout_width="381dp"
android:layout_height="28dp"
android:orientation="horizontal"
android:id="@+id/titleView2"
android:layout_weight="0.13">
<EditText
android:layout_width="174dp"
android:layout_height="wrap_content"
android:inputType="textCapWords|textPersonName"
android:ems="10"
android:id="@+id/editText"
android:textColor="#ffffff"
android:singleLine="true"
android:imeOptions="actionNext"
android:backgroundTint="#DD6A20" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textCapWords|textPersonName"
android:ems="10"
android:id="@+id/editText2"
android:layout_weight="1"
android:textColor="#ffffff"
android:singleLine="true"
android:imeOptions="actionNext"
android:backgroundTint="#DD6A20" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/email"
android:text="Email"
android:textColor="#ffffff"
android:textSize="18sp" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:ems="10"
android:id="@+id/editText6"
android:textColor="#ffffff"
android:imeOptions="actionNext"
android:backgroundTint="#DD6A20" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView5"
android:text="Enter A Password"
android:textColor="#ffffff"
android:textSize="18sp" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textVisiblePassword"
android:ems="10"
android:id="@+id/editText7"
android:textColor="#ffffff"
android:imeOptions="actionNext"
android:backgroundTint="#DD6A20" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView6"
android:text="Confirm Password"
android:textColor="#ffffff"
android:textSize="18sp" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textVisiblePassword"
android:ems="10"
android:id="@+id/editText8"
android:textColor="#ffffff"
android:imeOptions="actionNext"
android:backgroundTint="#DD6A20" />
<TextView
android:layout_width="242dp"
android:layout_height="wrap_content"
android:id="@+id/textView7"
android:text="Enter Your ID Provided By UT"
android:textColor="#ffffff"
android:textSize="16sp" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:id="@+id/editText9"
android:textColor="#ffffff"
android:imeOptions="actionDone"
android:backgroundTint="#DD6A20"
android:inputType="textVisiblePassword" />
<TextView
android:text="What Are You?"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView4"
android:textSize="16sp"
android:textColor="#ffffff" />
<Spinner
android:layout_width="185dp"
android:layout_height="wrap_content"
android:id="@+id/spinner_item"
android:textColor="#ffffff"
android:popupBackground="#DD6A20"
android:layout_marginBottom="8dp"/>
<Button
android:text="Sign Up"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/signIn"
android:textColor="#ffffff"
android:background="#DD6A20"
android:visibility="gone"/>
<Button
android:text="Sign Up"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/signIn2"
android:textColor="#ffffff"
android:background="#DD6A20"
android:visibility="invisible"/>
<Space
android:layout_width="match_parent"
android:layout_height="1dp" />
<TextView
android:text="An administator must approve your registration before you are able to sign in to your account"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView3"
android:textColor="#ffffff"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="2dp"
android:orientation="horizontal"
android:id="@+id/titleView3"
android:layout_weight="0.41"
android:gravity="center">
<TextView
android:text="Already Have Account?"
android:layout_width="196dp"
android:layout_height="wrap_content"
android:id="@+id/textView8"
android:textSize="18sp"
android:textColor="#ffffff"/>
<TextView
android:text="Log In"
android:layout_width="84dp"
android:layout_height="wrap_content"
android:id="@+id/textView9"
android:textSize="18sp"
android:textColor="#DD6A20"
android:textStyle="normal|bold|italic"
android:onClick="startLoginActivity"/>
</LinearLayout>
</LinearLayout>
</layout>
Here's the data binding xml that gives the errors:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_sign_up"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
tools:context="com.example.chave.utclinicalnursing.signUpActivity"
android:background="#11336A"
android:weightSum="1"
android:tag="layout/activity_sign_up_0"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="381dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:id="@+id/titleView"
android:layout_weight="0.04"
android:layout_marginTop="30dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/fNameTitle"
android:text="First Name"
android:textColor="#ffffff"
android:textSize="18sp"
android:layout_marginRight="85dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/lNameTitle"
android:text="Last Name"
android:textColor="#ffffff"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:layout_width="381dp"
android:layout_height="28dp"
android:orientation="horizontal"
android:id="@+id/titleView2"
android:layout_weight="0.13">
<EditText
android:layout_width="174dp"
android:layout_height="wrap_content"
android:inputType="textCapWords|textPersonName"
android:ems="10"
android:id="@+id/editText"
android:textColor="#ffffff"
android:singleLine="true"
android:imeOptions="actionNext"
android:backgroundTint="#DD6A20" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textCapWords|textPersonName"
android:ems="10"
android:id="@+id/editText2"
android:layout_weight="1"
android:textColor="#ffffff"
android:singleLine="true"
android:imeOptions="actionNext"
android:backgroundTint="#DD6A20" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/email"
android:text="Email"
android:textColor="#ffffff"
android:textSize="18sp" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:ems="10"
android:id="@+id/editText6"
android:textColor="#ffffff"
android:imeOptions="actionNext"
android:backgroundTint="#DD6A20" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView5"
android:text="Enter A Password"
android:textColor="#ffffff"
android:textSize="18sp" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textVisiblePassword"
android:ems="10"
android:id="@+id/editText7"
android:textColor="#ffffff"
android:imeOptions="actionNext"
android:backgroundTint="#DD6A20" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView6"
android:text="Confirm Password"
android:textColor="#ffffff"
android:textSize="18sp" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textVisiblePassword"
android:ems="10"
android:id="@+id/editText8"
android:textColor="#ffffff"
android:imeOptions="actionNext"
android:backgroundTint="#DD6A20" />
<TextView
android:layout_width="242dp"
android:layout_height="wrap_content"
android:id="@+id/textView7"
android:text="Enter Your ID Provided By UT"
android:textColor="#ffffff"
android:textSize="16sp" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:id="@+id/editText9"
android:textColor="#ffffff"
android:imeOptions="actionDone"
android:backgroundTint="#DD6A20"
android:inputType="textVisiblePassword" />
<TextView
android:text="What Are You?"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView4"
android:textSize="16sp"
android:textColor="#ffffff" />
<Spinner
android:layout_width="185dp"
android:layout_height="wrap_content"
android:id="@+id/spinner_item"
android:textColor="#ffffff"
android:popupBackground="#DD6A20"
android:layout_marginBottom="8dp"/>
<Button
android:text="Sign Up"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/signIn"
android:textColor="#ffffff"
android:background="#DD6A20"
android:visibility="gone"/>
<Button
android:text="Sign Up"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/signIn2"
android:textColor="#ffffff"
android:background="#DD6A20"
android:visibility="invisible"/>
<Space
android:layout_width="match_parent"
android:layout_height="1dp" />
<TextView
android:text="An administator must approve your registration before you are able to sign in to your account"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView3"
android:textColor="#ffffff"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="2dp"
android:orientation="horizontal"
android:id="@+id/titleView3"
android:layout_weight="0.41"
android:gravity="center">
<TextView
android:text="Already Have Account?"
android:layout_width="196dp"
android:layout_height="wrap_content"
android:id="@+id/textView8"
android:textSize="18sp"
android:textColor="#ffffff"/>
<TextView
android:text="Log In"
android:layout_width="84dp"
android:layout_height="wrap_content"
android:id="@+id/textView9"
android:textSize="18sp"
android:textColor="#DD6A20"
android:textStyle="normal|bold|italic"
android:onClick="startLoginActivity"/>
</LinearLayout>
</LinearLayout>
What is causing the parsing xml errors?
Here's the log output:
Executing tasks: [:app:generateReleaseSources, :app:prepareReleaseUnitTestDependencies, :app:mockableAndroidJar]
Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidDatabindingAdapters121Library UP-TO-DATE
:app:prepareComAndroidDatabindingLibrary121Library UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2421Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72421Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72421Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2421Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCompat2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUi2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUtils2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportFragment2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportMediaCompat2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2421Library UP-TO-DATE
:app:prepareReleaseDependencies :app:compileReleaseAidl UP-TO-DATE
:app:compileReleaseRenderscript UP-TO-DATE
:app:generateReleaseBuildConfig UP-TO-DATE
:app:generateReleaseResValues UP-TO-DATE
:app:generateReleaseResources UP-TO-DATE
:app:mergeReleaseResources
:app:dataBindingProcessLayoutsRelease
:app:processReleaseManifest
:app:processReleaseResources
AGPBI: {"kind":"error","text":"Error parsing XML: duplicate attribute","sources":[{"file":"D:\\Android\\Android Projects\\UTClinicalNursing\\app\\build\\intermediates\\data-binding-layout-out\\release\\layout\\activity_sign_up.xml","position":{"startLine":22}}],"original":"","tool":"AAPT"}
D:\Android\Android Projects\UTClinicalNursing\app\build\intermediates\data-binding-layout-out\release\layout\activity_sign_up.xml:23: error: Error parsing XML: duplicate attribute
FAILED
FAILURE: Build failed with an exception.
* What went wrong: Execution failed for task ':app:processReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
xmlns:android="http://schemas.android.com/apk/res/android"two times in the same tag.