How can I get my code back to what it was before I did something wrong in android studio? Apparently I deleted my code and there is only the gradle script. How can I recover it?
How can I get my code back to what it was before I did something wrong in android studio? Apparently I deleted my code and there is only the gradle script. How can I recover it?
Open your code in the editor (main screen), right-click, Local History, Show History. There you can check the latest local modifications.
If you do not have a history through Local History you will not be able to recover.
I recommend that you start using some code-versioning tool to keep track of your work and can retrieve what you've done.
One of the most famous tools is Git. Through it you can keep a history of all changes made, go back to some specific version and also work in parallel with another developer in the same code if any.