Android Studio flutter show corrupted code in all classes

295

Simple Step for your solution

  • Exit Android Studio

  • Delete caches folder from

    C:\Users\{username}\AppData\Local\Google\AndroidStudio2020.3
    
  • Open Android Studio and your code has being Perfect

Share:
295
Aris_choice
Author by

Aris_choice

Updated on December 31, 2022

Comments

  • Aris_choice
    Aris_choice over 1 year

    Android studio Version :- Arctic Fox | 2020.3.1

    All files show corrupted code check screenshot.

    I have tried all the possible way to get it worked. This problem is currently in My flutter Code but native android project also have same problem.

    • reinstalled android studio.
    • deleted gradle caches.
    • Invalidated/restarted project.

    enter image description here

    • Anas Nadeem
      Anas Nadeem almost 3 years
      Check opening the files in a text editor
    • Aris_choice
      Aris_choice almost 3 years
      @TechnicalWorld files opening correctly in text editor (notepad )
    • Anas Nadeem
      Anas Nadeem almost 3 years
      I dont know of any other solution rather than deleting cache files, maybe you can copy paste the files manually
    • Aris_choice
      Aris_choice almost 3 years
      yes copy/pasting is last option i will do that if not found any other solution.
    • Rahul
      Rahul almost 3 years
      you have git. checkout from the last code if there is no newer code. if there is, check out local history option in android studio.
    • Nikunj Paradva
      Nikunj Paradva almost 3 years
      remove caches folder from here and try againC:\Users\{username}\AppData\Local\Google\AndroidStudio2‌​020.3
    • Aris_choice
      Aris_choice almost 3 years
      @NikunjParadva your answer is working for me. Very Thanks!
    • Aris_choice
      Aris_choice almost 3 years
      @NikunjParadva upvote this question aswell
  • Mohit Raval
    Mohit Raval over 2 years
    thank you so much. It's working perfectly. :)