I was trying to run an android studio app but it gave an error for a particular .png image in the drawable folder which said that the file must end with .xml Even after replacing the image with a .xml file and deleting the initial .png file, the app still wouldn't run and said that the inital file must end with .xml
I had added a PNG image to my layout file called timout.png
<ImageView
android:id="@+id/imageView4"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="24dp"
app:layout_constraintEnd_toEndOf="@+id/textView2"
app:layout_constraintStart_toStartOf="@+id/textView2"
app:layout_constraintTop_toBottomOf="@+id/textView2"
app:srcCompat="@drawable/timeout" />
But while running the app, there was an error which said that timeout must end with .xml I couldn't figure out how to debug that so I deleted the timeout.png file and replaced it with a vector image ending with .xml
<ImageView
android:id="@+id/imageView4"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="24dp"
app:layout_constraintEnd_toEndOf="@+id/textView2"
app:layout_constraintStart_toStartOf="@+id/textView2"
app:layout_constraintTop_toBottomOf="@+id/textView2"
app:srcCompat="@drawable/ic_timeout" />
But after running this it still showed that timeout which was the initial png file must end with .xml I don't understand how timeout.png can give an error even after being deleted from the drawable foler. Can someone please help me with this?