2

i recently just finished my app for my school project before i go to sleep but i didn't build it yet for i thought that i will still put some changes in it the next morning then when my classmate ask me for help for their project i opened my android studio and this is what happens to my activity where all the codes that i made is in there i already try to check on the local history but their nothing shown. anyone could help me

<application>
  <component name="StatisticsApplicationUsages">
    <group name="run-configuration-type">
      <project id="MoniDroid" values="AndroidRunConfigurationType" collectionTime="1508377527412" />
    </group>
    <group name="frameworks">
      <project id="MoniDroid" values="android-gradle,java-gradle,android" collectionTime="1508377527256" />
    </group>
    <group name="run-configuration-type-temp">
      <project id="MoniDroid" values="AndroidRunConfigurationType" collectionTime="1508377527412" />
    </group>
    <group name="file-type">
      <project id="MoniDroid" values="Properties,Groovy,JAVA,ProGuard File,ARCHIVE,PLAIN_TEXT,UNKNOWN,Images,IDEA_MODULE,XML" collectionTime="1508377535538" />
    </group>
    <group name="images.ide.background">
      <project id="MoniDroid" values="frame=0,editor=0" collectionTime="1508377539101" />
    </group>
    <group name="module type">
      <project id="MoniDroid" values="JAVA_MODULE" collectionTime="1508377527318" />
    </group>
    <group name="Git">
      <project id="MoniDroid" values="config.ssh.enabled,config.repo.sync.NOT_DECIDED,config.warn.about.detached.enabled,config.save.policy.STASH,config.push.autoupdate.disabled,config.force.push.enabled,config.push.update.all.roots.enabled,config.warn.about.crlf.enabled,config.update.type.BRANCH_DEFAULT,config.cherry-pick.autocommit.disabled" collectionTime="1508377540992" />
    </group>
    <group name="language-level">
      <project id="MoniDroid" values="JDK_1_7" collectionTime="1508377540570" />
    </group>
  </component>
  <component name="UsageTrigger">
    <counts>
      <entry feature="CreateFile.CreateFileAction" count="4" />
      <entry feature="execute.AndroidRunConfigurationType.Debug" count="2" />
      <entry feature="execute.AndroidRunConfigurationType.Run" count="1451" />
      <entry feature="ide.settings.Appearance" count="1" />
      <entry feature="ide.settings.Plugins" count="1" />
      <entry feature="ideaapp.started" count="140" />
      <entry feature="terminal.win" count="1" />
      <entry feature="tips.of.the.day.next" count="20" />
      <entry feature="tips.of.the.day.prev" count="14" />
      <entry feature="welcome.screen.WelcomeScreen.CreateNewProject" count="2" />
    </counts>
  </component>
</application>

1 Answers1

2

You can get your code back from local history of Android Studio. You need to follow below steps.

1) Launch Android Studio and open the file (It can be your activity or xml code file)

2) Click on VCS

3) Go to Local History from the menu

4) And select Show local history

5) No 5th step :)

Get your code from history

Abdul Waheed
  • 4,540
  • 6
  • 35
  • 58