1

My pc crashed. A java file became corrupted, and that file just displays 'nul' 'nul' etc. in notepad++. When I try and click on the file to open it, Android Studio crashes, and if I right click on that file and try and restore it by clicking on local history>show history, Android Studio crashes.

Does anyone know how I can restore the file using local history without Android studio crashing?

I found Android Studio's local history folder which contains 2 files: 1.changes.storageData and changes.storageRecordIndex, perhaps I can retrieve the file through these files. Does anyone know how to browse them?

Thanks in advance

Micah Simmons
  • 2,078
  • 2
  • 20
  • 38
  • they are both binary data, did you try to replace your "null" java source with plain ascci file and then restore? maybe AS crashes since it cannot read binary "null" file? – pskink Apr 29 '16 at 11:56
  • Thanks for your response. I am not 100% sure how to replace the java source with plain asccii file. Do you mean replace the corrupted file with a .txt file with the same name as the original file? I did try that but AS doesn't seem to be able to find the history of the corrupted file when I searched through 'show history' – Micah Simmons Apr 29 '16 at 12:39
  • strange, if i do that i see on the list on the left "normal" editor changes and the latest called "External change" – pskink Apr 29 '16 at 12:51
  • On the left, I see external changes, but, I can't seem to see ''normal' editor changes. On the right pane of the 'show history' window, it does have the old file available, but it's the corrupted file, and if I try and open it then a blacks screen shows – Micah Simmons Apr 29 '16 at 13:01
  • so it seems you have a bad luck, sorry ;-( – pskink Apr 29 '16 at 13:10
  • No worries, I decompiled the apk and got the file back but the decompiling process seems to have affected some variables, but at least the file wasn't totally lost – Micah Simmons Apr 29 '16 at 13:15

0 Answers0