Android Studio: Accidentaly ignored “xmlns” attribute
Using Android Studio in the XML-Layout-editor,
When an error saying something about the xmlns not being found, I checked quickly for a fix with the help of the editor, and I chose one that said something about ignore.
Suddenly, this error,
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> .... </RelativeLayout>
Where it says element RelativeLayout must be declared and this follows for all childrens aswell. The <RelativeLayout is the part that has the error. Also the childern, such as <LinearLayout has this error.
Where can I remove the ignore?
You can check if the file is in "layout" folder.
I also met the error element RelativeLayout must be declared. I realized that my file was located in "drawable" folder, instead of the "layout" folder. That's why the error showed up.