i have always added drawable as background to my view before now. but of recent when i add a drawable as background to any view such as LinearLayout, view, TextView i get this error
error: resource drawable/rectangle_white (aka merchant.com.our.nextlounge:drawable/rectangle_white) not found.
Message{kind=ERROR, text=error: resource drawable/rectangle_white (aka merchant.com.our.nextlounge:drawable/rectangle_white) not found., sources=[C:\Users\USER\Documents\Exolve Project\NextLounge\app\src\main\res\layout\activity_dash_auth.xml:45], original message=, tool name=Optional.of(AAPT)}
I have refreshed, cleaned, build but its not working. the only way it work is if i add multiple drawable API folder such as drawable-v21,drawable-v22,drawable-v23
for it to work. Please how do i fix this issue.
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
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"
tools:context=".activity.DashAuthActivity">
<include layout="@layout/background_auth"/>
<include layout="@layout/logo"
android:id="@+id/logo"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<TextView
android:id="@+id/text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/intro_text"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/logo"
app:layout_constraintBottom_toBottomOf="@id/linearLine"
android:layout_margin="20sp"
app:layout_constraintVertical_bias="0.0"
android:padding="8dp"
android:textAlignment="center"
android:textColor="@color/white"/>
<LinearLayout
android:id="@+id/linearLine"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="4"
android:padding="4dp"
android:layout_margin="24dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintVertical_bias="0.96"
app:layout_constraintBottom_toTopOf="@+id/linearButton"
android:layout_marginBottom="20sp">
<View
android:layout_width="0dp"
android:layout_height="6dp"
android:background="@drawable/rectangle_white"
android:layout_weight="2.5"/>
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="0.3"/>
<View
android:layout_width="0dp"
android:layout_height="6dp"
android:background="@drawable/rectangle_white_line"
android:layout_weight="1.2"/>
</LinearLayout>
<LinearLayout
android:id="@+id/linearButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="4"
android:padding="4dp"
android:layout_margin="20dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
<Button
android:id="@+id/buttonSignIn"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="2"
android:layout_marginRight="4dp"
android:layout_marginEnd="4dp"
android:text="@string/sign_in"
android:textColor="@color/black"
android:textAllCaps="false"
android:textSize="18sp"
android:background="@color/white"/>
<Button
android:id="@+id/buttonSignUp"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="2"
android:layout_marginLeft="4dp"
android:layout_marginStart="4dp"
android:text="@string/sign_up"
android:textAllCaps="false"
android:textSize="18sp"
android:textColor="@color/white"
android:background="@color/orange"/>
Below is the rectangle_white.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:color="#fff"
android:width="2dp"/>
</shape>