Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio - All file names in project are red but there are no errors

I imported a ADT Project in Android Studio. I got a ton of errors, but I could fix them all. I don't think the "how" is important in this case, I wouldn't be able to recall all the errors anyways. The project runs now without errors, but somehow Android Studio marks all files red. Just the filenames, there are no errors in the code. I tried cleaning and restarting.

enter image description here

Did someone experience something like this before? Or maybe a related problem with IntelliJ someone could solve?

Edit:
It was the version control. The project was unversioned but in a SVN controlled folder. Thats what the red was indicating. A solution could be to copy the project to a different folder or to add the files to version control.

like image 687
tritop Avatar asked Aug 11 '14 14:08

tritop


People also ask

Why are all my files red in Pycharm?

The files in Pycharm are under Version Control. Pycharm changes the file's color by the status of file. The 'red' color of the file you mentioned indicated that the file is 'Unkown' status to the version control. If you add the 'Unkonwn' file to version control and commit to repository, the 'red' color can be changed.

Why is my file name red in R studio?

Notice that after you type any script in your source pane, the file name in the tab will be red and have an asterisk at the end. This means your edits are unsaved.

Why are all my files red in Intellij?

It means that the files exist locally, but are not in the repository, and are not scheduled for addition. With other words, the files are not under version control. There is not really a problem since the files can just be added to the VCS if desired.


2 Answers

Perhaps you are seeing the File Status colors that Android Studio uses to show the status of the file. Open Settings and go to Editor > Colors & Fonts > File Status. Here you can see what all of the different colors mean. My guess is that your reddish files are that color because you have not yet added them to source control.

like image 173
Scott W Avatar answered Oct 10 '22 00:10

Scott W


I had the same problem: everything was in red and my MainActivity was not found. I resolved it doing:

File -> Invalidate Caches / Restart

like image 39
Netero Avatar answered Oct 10 '22 01:10

Netero