简体   繁体   English

如何在 Android Studio 中将我的项目恢复到旧版本?

[英]How do I restore my project to an older version in Android Studio?

I'm not using subversion or something like this, only Android Studio.我没有使用 subversion 或类似的东西,只使用 Android Studio。 I messed up some features and I need to get back to an older version of the project我搞砸了一些功能,我需要回到项目的旧版本

How do I do it?我该怎么做?

Right click on a class file, and select "Local History".右键单击类文件,然后选择“本地历史记录”。 This will also work on directories.这也适用于目录。

在应用程序模块目录上显示本地历史记录

Switch view to Android in the left part of the Android Studio, right-click the app node, Local History , Show History .在Android Studio左侧切换视图到Android ,右键点击app节点, Local HistoryShow History Then find the revision you want back, right click it and choose Revert .然后找到您想要恢复的修订,右键单击它并选择Revert Your whole project will be reverted to this state.您的整个项目将恢复到此状态。

Switch to Project in the left part of Android Studio, right-click the application name on top, click Local History , click Show History .切换到 Android Studio 左侧的Project ,右击上方的application name ,点击Local History ,点击Show History

Then find the revision you want back, right click it and choose Revert .然后找到您想要恢复的修订,右键单击它并选择Revert Your whole project will be reverted to this state.您的整个项目将恢复到此状态。

Another solution here suggested Switch to Android in the left menu before reverting but that will not revert the entire project .此处的另一个解决方案建议在还原之前在左侧菜单中切换到 Android,但这不会还原整个项目 I failed using that solution.我使用该解决方案失败。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM