jithin mp
jithin mp

Reputation: 95

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.

Upvotes: 2

Views: 1499

Answers (1)

Md. Enamul Haque
Md. Enamul Haque

Reputation: 1026

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..

Upvotes: 2

Related Questions