Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

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

Posted on November 11, 2022 By

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

READ  [FIXED] android - Problem ending programmatically an activity right after setting SharedPreferences
Powered by Inline Related Posts
Android Tags:android, android-studio, ide, kotlin

Post navigation

Previous Post: [FIXED] java – The Android LoaderManager is deprecated. Now what?
Next Post: [FIXED] android – Is WorkManager the right solution for me?

Related Posts

[FIXED] geolocation – Codename One app not provide real location Android
[FIXED] java – Android studio, open a file , continuously write and then close Android
[FIXED] How to change android API 26 to 29+ in Android Studio? Android
[FIXED] android – Room Migration Not Finding Table Columns Android
[FIXED] truckRestrictionPenalty=soft in here maps android sdk Android
[FIXED] android – Does Zebra DataWedge capture the on-scanner hardware key presses? Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • Which is stronger 19 gauge or 23 gauge?
  • Does BMW still use GM transmissions?
  • Is primary or secondary market research better?
  • What does it mean when ADT says low battery?
  • Can a baby sleep on a regular mattress?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme