Q:

Android studio codes are showing red color.  But it runs successfully

All codes in my project will be in red color .  But i can run my project successfully.  i updated andriod 
 studio as well as i clean , rebuild the project.  The errors are still existing there.  Can anyone help to 
 solve the problem.  

A:

Solution 1:

try sync gradle 
File -> Sync Project With gradle Files 

If not work, follow solution 2.  

Solution 2:

Just remove  dependencies inside dependencies{} section and sync
then back to all dependencies and sync
Step 1
//1.  Remove all dependencies 
//2.  Sync
dependencies {

}

Step 2
//1.  back to all dependencies (Re-Add) 
//2.  Sync
dependencies {
   implementation fileTree(include: ['*.jar'], dir: 'libs')
   ......
   ......
}

One day I face same problem and I solve them by second tricks.. 

