Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I accidently deleted an activity.java from my com.packagename.appname. How do I get it back?

While adding a feature to my app I messed up and decided to delete all the new files I had added for it but in doing that I accidentally deleted one of the activity from my app. I have integrated version control in my app and also shared my whole app source with GitHub but for some reason whenever I check out of previous version controls I cannot find the file. How can I recover the activity.java file? I have the app installed on my phone. Is it possible to recover it from there? or any other way to recover it?

like image 517
Pallav Chaudhari Avatar asked Jun 29 '19 14:06

Pallav Chaudhari


1 Answers

If Ctrl + z or version control didnt worked try to check the local history of the android studio:

Move to project structure -> right click on your app name -> local history -> show history

enter image description here

like image 58
Tamir Abutbul Avatar answered Sep 22 '22 09:09

Tamir Abutbul