ita*_*lah 3 android-studio-3.0 android-studio-3.5
当我由于窗户冻结而重启计算机后,遇到了一个真正的奇怪情况,我在Android Studio中将某些Java代码转换为一些奇怪的xml代码,而我编写的所有这些代码都丢失了!我两次遇到这种情况,这是我第一次遇到这种情况,因为最后一次提交后所做的更改很少,所以我将代码恢复为最后一次提交。但是这次这次更改在上一次提交之后是巨大的,我完全感到困惑!
以下是我的小代码之一的转换方式。
<component name="libraryTable">
<library name="Gradle: com.android.support:print:28.0.0@aar">
<ANNOTATIONS>
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/print-28.0.0.aar/87cddf7f66cc3e6d635cf04e7292a008/annotations.zip!/" />
</ANNOTATIONS>
<CLASSES>
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/print-28.0.0.aar/87cddf7f66cc3e6d635cf04e7292a008/res" />
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/print-28.0.0.aar/87cddf7f66cc3e6d635cf04e7292a008/jars/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
Run Code Online (Sandbox Code Playgroud)
我的Android Studio版本:3.3.1
有什么方法可以找回我编写的代码吗?
任何帮助,将不胜感激。
我再次面对同样的情况。这是我用xml替换的另一个代码之一
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AndroidConfiguredLogFilters">
<filters>
<filter>
<option name="logLevel" value="verbose" />
<option name="logMessagePattern" value="" />
<option name="logTagPattern" value="(MainActivity|Download|BooksFrag|Reading|BookPage|BookDetails|PageNumberPicker)" />
<option name="name" value="Unnamed-0" />
<option name="packageNamePattern" value="" />
<option name="pid" value="" />
</filter>
</filters>
</component>
<component name="AndroidLayouts">
<shared>
<config />
</shared>
</component>
<component name="AndroidLogFilters">
<option name="TOOL_WINDOW_CONFIGURED_FILTER" value="Unnamed-0" />
</component>
<component name="ChangeListManager">
<list default="true" id="0218df07-b316-45c7-a2ad-66ba2c0b4c43" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/app/src/main/java/com/sed/maktaba_daar_al_hadeeth/utilities/RealmDBHelper.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/com/sed/maktaba_daar_al_hadeeth/BookSearchResultsContainer.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/com/sed/maktaba_daar_al_hadeeth/BookSearchResultsContainer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/com/sed/maktaba_daar_al_hadeeth/BookSearcher.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/com/sed/maktaba_daar_al_hadeeth/BookSearcher.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/com/sed/maktaba_daar_al_hadeeth/SearchOptions.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/com/sed/maktaba_daar_al_hadeeth/SearchOptions.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/com/sed/maktaba_daar_al_hadeeth/SearchResult.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/com/sed/maktaba_daar_al_hadeeth/SearchResult.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/com/sed/maktaba_daar_al_hadeeth/SearchResultViewHolder.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/com/sed/maktaba_daar_al_hadeeth/SearchResultViewHolder.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/com/sed/maktaba_daar_al_hadeeth/activities/ReadingActivity.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/com/sed/maktaba_daar_al_hadeeth/activities/ReadingActivity.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/com/sed/maktaba_daar_al_hadeeth/utilities/ArabicUtilities.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/com/sed/maktaba_daar_al_hadeeth/utilities/ArabicUtilities.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/values/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values/strings.xml" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ExternalProjectsManager">
<system id="GRADLE">
<state>
<projects_view />
</state>
</system>
</component>
<component name="FUSProjectUsageTrigger">
<session id="1042793738">
<usages-collector id="statistics.lifecycle.project">
<counts>
<entry key="project.closed" value="23" />
<entry key="project.open.time.12" value="2" />
<entry key="project.open.time.13" value="2" />
<entry key="project.open.time.14" value="1" />
<entry key="project.open.time.15" value="3" />
<entry key="project.open.time.16" value="1" />
<entry key="project.open.time.17" value="1" />
<entry key="project.open.time.18" value="2" />
<entry key="project.open.time.2" value="1" />
<entry key="project.open.time.21" value="1" />
<entry key="project.open.time.22" value="1" />
<entry key="project.open.time.24" value="1" />
<entry key="project.open.time.25" value="2" />
<entry key="project.open.time.26" value="2" />
<entry key="project.open.time.27" value="5" />
<entry key="project.open.time.28" value="1" />
<entry key="project.open.time.29" value="1" />
<entry key="project.open.time.3" value="1" />
<entry key="project.open.time.30" value="1" />
<entry key="project.open.time.31" value="1" />
<entry key="project.open.time.32" value="1" />
<entry key="project.open.time.36" value="1" />
<entry key="project.open.time.4" value="1" />
<entry key="project.open.time.46" value="1" />
<entry key="project.open.time.49" value="1" />
<entry key="project.open.time.5" value="2" />
<entry key="project.open.time.50" value="1" />
<entry key="project.open.time.51" value="1" />
<entry key="project.open.time.6" value="2" />
<entry key="project.open.time.7" value="1" />
<entry key="project.open.time.8" value="2" />
<entry key="project.opened" value="44" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.open">
<counts>
<entry key="MF" value="1" />
<entry key="css" value="4" />
<entry key="csv" value="11" />
<entry key="gradle" value="14" />
<entry key="java" value="298" />
<entry key="js" value="19" />
Run Code Online (Sandbox Code Playgroud)
我在这里记录了与Google的问题。
谢谢。
我在Android Studio 3.5.2中也遇到了这个问题。看来问题尚未解决。
不用担心!
转到位于中的android studio文件夹,Users/user/.androidstudiov.x.x
然后删除缓存并重新启动android studio。我升级到新版本后几天就发生了这个问题。甚至XML和Java类都将具有此功能。但是,您的所有数据都是安全的。android studio中的错误,正在导入设置。
| 归档时间: |
|
| 查看次数: |
295 次 |
| 最近记录: |