不正确关闭后 Android Studio 损坏的 .java 文件 [英] Android Studio Corrupted .java file after improper shutdown

查看:36
本文介绍了不正确关闭后 Android Studio 损坏的 .java 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行 Android Studio 时使笔记本电脑休眠,后来发现笔记本电脑已关闭.现在我的一个源文件在 Android Studio 和写字板中也显示为空.当我在 Notepad++ 中打开它时,它显示 NUL 字符.该文件的大小与之前相同,这意味着文件内容不会丢失(希望如此).

I hibernated my laptop when Android Studio was running and found later that the laptop had been shut down. Now one of my source files is appearing empty in Android Studio and in Wordpad as well. When I open it in Notepad++, it shows NUL character. The file has the same size as it had before which means that the file content is not lost (hopefully).

如何恢复该文件的实际内容?我需要这个,因为我没有这个文件的备份.

How do I recover the actual content of this file? I need this as I didn't have a backup of this file.

推荐答案

查看 Android Studio 是否在本地历史记录中保留了一个版本.

See if Android Studio kept a version in local history.

转到您在 Android Studio 中的 java 文件,然后导航到

Go to your java file in Android Studio, and navigate to

VCS -> Local History -> See History

另外,开始使用版本控制,比如 git.

Also, start using version control, like git.

这篇关于不正确关闭后 Android Studio 损坏的 .java 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆