I tried to use DataBinding Library in my app then i found this error
Android resource compilation failed Output: /Users/adham/Desktop/android/ToDo/app/build/intermediates/incremental/m ergeDebugResources/stripped.dir/layout/activity_main.xml:13: error: duplicate attribute.
Command: /Users/adham/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/563a6f08d33eace272a78ff5e80c3e9b/aapt2-3.2.1-4818971-osx/aapt2 compile --legacy \ -o \ /Users/adham/Desktop/android/ToDo/app/build/intermediates/res/merged/debug \ /Users/adham/Desktop/android/ToDo/app/build/intermediates/incremental/mergeDebugResources/stripped.dir/layout/activity_main.xml Daemon: AAPT2 aapt2-3.2.1-4818971-osx Daemon #2 And this is main_activity.xml
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/layout">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background"
android:gravity="center"
android:orientation="vertical"
tools:context=".MainActivity">
<FrameLayout
android:id="@+id/activity_main_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<ListView
android:id="@+id/activity_main_list_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="8dp"
android:background="@drawable/bottombarrounded"
android:gravity="center">
<EditText
android:id="@+id/activity_main_edit_text"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/edittextrounded"
android:hint="@string/edit_text_hint"
android:inputType="textCapSentences|textMultiLine"
android:maxLength="2000"
android:maxLines="4"
android:paddingLeft="32dp"
android:textColor="@color/black"
android:textColorHint="@color/edit_text_color" />
<Button
android:id="@+id/activity_main_post_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="64dp"
android:background="@drawable/roundedbutton"
android:text="@string/post_button"
android:textColor="@color/text_color"
android:textSize="20sp"
android:textStyle="bold" />
</LinearLayout>
</FrameLayout>
</LinearLayout>
</layout>
What Should I Do ?
activity_main.xml
code? – Blind Kaixmlns
and don't pass the context 2 times. So deletetools:context=".MainActivity"
– Blind Kai