Solution 1 :
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..
Problem :
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.
Comments
Comment posted by Shahnawaz Khan
just try to re-sync gradle and if does not work then do invalidate cache and restart.
Comment posted by Rutvik Bhatt
Open File menu > Invalidate Caches / Restart.. option and click on the Invalidate and Restart.
Comment posted by Mahendra Gohil
just delete .gradle directory and rebuild the project if not solve then go to the File menu > Invalidate Caches / Restart
Comment posted by jithin mp
@ShahnawazKhan I did it. But still error exists