Reputation: 234
I just did an update of Android Studio and the project I was working currently on was completely erased. I think it prompt me on "terminating the main process" and I accidentally clicked ok. Is there a way to recover my project somehow? Why would the files be erased by simply updating?
Upvotes: 5
Views: 7189
Reputation: 1
I created an API module just in line with the app module. But when I closed Android Studio and then opened it again, the file was no longer visible in the Android Studio project and Android View.
Then I reinstalled Android Studio and cleared the caches and local history, and it worked for me. I got that module back in place.
For clearing caches and local history :- Go to -> File -> Invalidate caches. Tick all the parameters and click "Invalidate and Restart" button.
Upvotes: 0
Reputation: 98
I face same problem too. I solved the problem by doing following steps.
In Android Studio, open the project main directory.
File -> Open -> Folder path where your missing project existed.
Lets say if your missing project is under ../AndroidStudioPrj/MyApp, please open AndroidStudioPrj directory.
Then VCS -> Local History -> Show History In history, you can revert to get back your code. [
Upvotes: 0
Reputation: 31
In my case i didnt lose the whole project just the main folder which contains the java and the ressource file
I right click the project --> local history --> show history
--> revert selection
If you dont have the project you can create one with the same name same file names then do exactly the same thing as mentioned
Its a lesson to use github :v
Upvotes: 3
Reputation: 11
I am having the Same problem even now on Android Studio 3.1.4. The entire project folder is wiped out.
But what I do currently is immediately save the entire project folder somewhere, like Company Folder, then Copy and paste again. Hectic though.
Done this ten times now. I will test not using default project location like /users/........
Upvotes: 0
Reputation: 39
I got the answer from the same problem here.
The project is not erased,just moved to another place, I also don't know why.
I just search my project's name in all my disk, then find the project under another folder.
I use the Mac OS, so the new folder is-
/Users/jokerlee/Applications/AndroidStudioProjects
Upvotes: 1
Reputation: 21
I've had the same situation. I haven't been able to replicate the behaviour. My hope is the details bellow will contribute to some answer.
I was working on a project that required the addition of some JAR dependancies. The JAR dependancies, were added to the lib file and I was editing the project build.gradle script to compile them.
I was adding a dependency for jackson JSON to the build.gradle file when the issue occurred.
While typing 'compile com' android studio locked up for a moment. All the files in the project manger disappeared. Android Studio ran thru a gradle build.
Initially I though I'd inadvertently opened an new empty project. Unfortunately my files were gone.
I had been working on this file during the previous 24 hours, opening it thru the 'File -> Open Recent' that morning to pick up where I left off the previous day.
It was Disconcerting.
Upvotes: 2