Good afternoon, how can I restore an accidentally deleted class in the android studio project?
- 2ctrl + Z on package try, mb will save =) - Android Android
- @ Android Android forgot to specify the studio was closed and opened several times. - Varg Sieg
- five<bore> git / mercurial / svn </ bore> - Vladimir Gamalyan
- same as any other file. - Vladyslav Matviienko
- 2To prevent such distress from happening later, use one of the version control systems, such as Git. This will allow you to recover not only deleted files, but also to roll back to the past state, if something suddenly went wrong, regardless of the number of IDE / close openings / - pavlofff
|
2 answers
Right-click in the project for the folder where the file was, select Local History -> Show History .
There are a lot of things you can roll back, even if the studio was closed.
|
In android studio, as in any self-respecting program)), there is a function Undo. In the upper left part, on the panel, click the button with the rounded back arrow and your class will be restored. But if the studio has already been closed, then it is considered that the changes have taken effect. In this case, you can search for a deleted file using LocalHistory - Show History open on the folder where the file was deleted.
|