从Android中的应用程序恢复已删除的Xml文件

问题描述:

是否可以从Android IDE中的应用程序恢复已删除的XML文件?

Is it possible to recover a deleted XML file from app in Android IDE?

很遗憾,我从应用程序中删除了重要文件.

Unfortunately I deleted important files from my app.

对于Eclipse:

要以本地状态还原已删除的Workbench资源 历史:

To restore a deleted Workbench resource with a state from the local history:

  1. 在其中一个导航视图中,选择文件夹或项目到 您要还原的本地历史记录状态
  2. 来自资源的 弹出菜单,选择从本地历史记录还原...". 本地历史记录"对话框打开,显示以前的所有文件 包含在所选文件夹或项目及其所有 子文件夹.
  3. 检查要还原的文件
  4. 如果你不这样做 只想恢复文件的最后状态,您可以选择其他任何一个 右侧本地历史记录"列表中文件的状态 对话框的.对话框的底部窗格显示了 状态.
  5. 如果已处理完所有文件,请单击还原".
  1. In one of the navigation views, select the folder or project into which you want to restore a local history state
  2. From the resource's pop-up menu, select Restore from Local History.... The Restore From Local History dialog opens showing all files that were previously contained in the selected folder or project and all of their sub-folders.
  3. Check the files that you want to restore
  4. If you don't want to restore just the last state of a file you can select any other state of the file from the Local History list on the right hand side of the dialog. The bottom pane of the dialog shows the contents of the state.
  5. If you are done with all files click Restore.

(对于Android Studio/IntelliJ/AppCode:

For Android Studio / IntelliJ / AppCode:

  1. 转到项目"工具窗口,然后右键单击"项目"节点或仅是一个文件夹(该文件曾经存在于此文件夹)
  2. 在上下文菜单上,选择本地历史记录",然后在子菜单上单击"显示历史记录"
  3. 项目或文件夹的本地历史记录视图向您显示最近几天所做的一切.在对话框下部的操作列中,选择要回滚的操作.在我们的例子中,这是删除动作.这样,对话框的上部将显示已更改文件的树状视图.
  4. 如果您只想还原已删除的文件,而不管此后进行的其他任何更改,则可以在树状视图中选择文件Lost.txt,然后单击还原按钮.上方工具栏.该文件将以静默方式还原.
  1. Go to the Project tool window and right-click the project node or just a folder, where the file used to exist
  2. On the context menu, choose Local History, and click Show History on the submenu
  3. The local history view for a project or folder shows you everything that you have done during the last few days. In the Action column of the lower part of the dialog box, select the action you want to roll back. In our case, this is the Deleting action. So doing, the upper part of the dialog box shows the tree view of changed files.
  4. If you want to restore the deleted file only, regardless of the other changes that have been done since then, you can select the file Lost.txt in the tree view and click the Revert button on the upper toolbar. The file will be restored silently.

(来源)