Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Content is Not Allowed in Prolog in res images

I have read others SO answers but i cant figure it out...please help me. When i tired to copy my splash screen images to res folder...after copying files i am getting this errors

home/nteam/OrderliteProject/Orderlite/app/src/main/res/xxxhdpi/sp_bg.png
Error:(1, 1) Error: Content is not allowed in prolog.
/home/nteam/OrderliteProject/Orderlite/app/src/main/res/hdpi/sp_bg.png
Error:(1, 1) Error: Content is not allowed in prolog.
/home/nteam/OrderliteProject/Orderlite/app/src/main/res/xxhdpi/sp_bg.png
Error:(1, 1) Error: Content is not allowed in prolog.
/home/nteam/OrderliteProject/Orderlite/app/src/main/res/mdpi/sp_bg.png
Error:(1, 1) Error: Content is not allowed in prolog.
/home/nteam/OrderliteProject/Orderlite/app/src/main/res/ldpi/sp_bg.png
Error:(1, 1) Error: Content is not allowed in prolog.
/home/nteam/OrderliteProject/Orderlite/app/src/main/res/xhdpi/sp_bg.png
Error:(1, 1) Error: Content is not allowed in prolog.
:app:mergeDebugResources FAILED

I also tried to delete these images and try to recompile it but i steel get the same error. Please help me.

like image 308
H Raval Avatar asked Jan 29 '16 05:01

H Raval


1 Answers

You have invalid directory names in /res. The valid directory names for Drawable Resources start with drawable-. For example, drawable-xxxhdpi, drawable-xxhdpi, drawable-xhdpi, etc.

like image 176
Mike M. Avatar answered Oct 13 '22 17:10

Mike M.