Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I paste image inside the drawable folder in android studio 4.1 , it shows red lines (error line) in image name

This is my project folder, when i adding first image then it not show any error but after adding the 2nd and 3rd image it show the red lines. I don't know where i do mistake, if anyone knows then please help me.

enter image description here

like image 975
Jyoti Prajapati Avatar asked Nov 20 '20 09:11

Jyoti Prajapati


2 Answers

In Android Studio, click on View > Tool Windows > Resource Manager in the menus or click on the Resource Manager tab to the left of the Project window. Click the + below Resource Manager, and select Import Drawables. This opens a file browser.

like image 142
Jo M Avatar answered Sep 18 '22 14:09

Jo M


Make sure the name of the image you are trying to add does not resemble some keyword. I was trying to add an image in drawable with name "try". When i made it "tried" error went away. So, name your image != any keyword.

FOR YOUR CASE IN PARTICULAR:

Try invalidating cache and restarting it. Moreover, also check if the problem persists only with these two images or others too.

like image 38
Rishav Sharma Avatar answered Sep 20 '22 14:09

Rishav Sharma