Blog Infos
Author
Published
Topics
,
Published

You probably should have taken a break hours ago, but you are just so close! Then all of a sudden, you realize that a core section of your project is gone, and you cannot for the life of you remember how you did it. However, today we are going to focus more on the solutions to recover deleted files in Android Studio rather than pour salt on the wound. If you’re experiencing an accidental deletion in Android Studio or in any other IDE, keep reading.

How to Restore Deleted Files/Projects in Android Studio

When it comes to programming, accidents or data loss can happen all too often. Don’t worry, even if you can not find anything in the default trash can. Just follow the steps below, and restoring deleted files in Android Studio can become much easier.

Restore Deleted Files in Android Studio

Unlike version control systems that only track changes between commits, local history records your project’s revisions as you edit code, run tests, deploy applications, and so on. You can actually solve most of your issues from local history, which lets you restore deleted files, bring back separate changes, or roll back to any state of a file. If you messed up some features and need to get back to the previous version of the project, it is also the easiest way for you.

  • Step 1. Switch the view to Android in the left part of the Android Studio, and right-click the class file (app node).
  • Step 2. Move to Local History. Local History should be near the bottom of the list of options and shows the most recent changes that you have made to your programs. Click Show History.

You can select any folder in the browser and check the Local History (i.e. the app directory).

  • Step 3. Find the version you desire there, right-click it and choose Revert selection.

Now, your whole project in Android Studio will be restored to the state you desire. Do not remember where the deleted file was housed? No need to worry! We have some more viable options for recovering those files. The key to this resides in the recent changes section. This method effectively helps you undo a deleted file in Android Studio.

  • Step 1. Follow this Path: View > Recent Changes
  • Step 2. Select the Deleted File. Click Revert. And just like that, your file is back!

Note: If you can’t find anything you desire in Local History and you local hard drives. In this situation, the only solution for you to restore the lost files in Android Studio is using the third party data recovery software.

Thank you for taking the time to read this article. If you found this post to be useful and interesting, please clap and recommend it.

If I got something wrong, mention it in the comments. I would love to improve

Connect with me on GitHub and LinkedIn.

This article was previously published on proandroiddev.com

Job Offers

Job Offers


    Android Team Lead

    Komoot
    Remote EMEA
    • Full Time
    apply now

    THESE DAYS; AUTOMOTIVE HISTORY IS WRITTEN IN CODE

    BMW Group
    Munich, Ulm
    • Full Time
    apply now

    Flutter Developers and Architects

    Rebell App Studio by Codemate
    Helsinki, Oulu, Bangkok
    • Full Time
    apply now
Load more listings

OUR VIDEO RECOMMENDATION

,

A shortcut for your productivity in Android Studio

Throughout my journey as a developer, I’ve spent countless hours in front of Android Studio. In order to be more productive, it was important for me to know the right shortcuts and how to use…
Watch Video

A shortcut for your productivity in Android Studio

Zhenlei Ji
Android Engineer ,Script Addicted ,Origami Enthusiast

A shortcut for your productivity in Android Studio

Zhenlei Ji
Android Engineer ,Sc ...

A shortcut for your productivity in Android Studio

Zhenlei Ji
Android Engineer ,Script ...

Jobs

YOU MAY BE INTERESTED IN

YOU MAY BE INTERESTED IN

blog
Compose is part of the Jetpack Library released by Android last spring. Create Android…
READ MORE
blog
Today, I will share my recent experience of not reading the documentation 📖carefully about…
READ MORE
blog
In this article, you’ll learn how to create accessible mobile apps for Android OS.…
READ MORE
blog
READ MORE

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

Menu