I was watching around for a bug and one solution says to do: "File > Invalidate Caches and Restart"
But then I find my build.gradle
replaced with unknown data.
Later I replaced it again with "previous" data. And again did the same "File > Invalidate Caches and Restart"
Now, my activity_main.xml
file got replaced with this:
<component name="libraryTable">
<library name="Gradle: com.android.support.constraint:constraint-layout-solver:1.1.3@jar">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.support.constraint/constraint-layout-solver/1.1.3/bde0667d7414c16ed62d3cfe993cff7f9d732373/constraint-layout-solver-1.1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
What triggered this? I lost my XML code here.
The Gradle build system in Android Studio makes it easy to include external binaries or other library modules to your build as dependencies. The dependencies can be located on your machine or in a remote repository, and any transitive dependencies they declare are automatically included as well.
gradle/ and . idea/ are safe to delete, though I would have the IDE not be open on that project while you do it. If that is your only project, close Android Studio, then delete those directories using your OS file explorer or the command line.
Explanation. Using putExtra() method, we can send the data. While using it, we need to call setResult() method in services. We can also store data in a common database and access it on services as well as in Activity.
You can also access free internal storage from your Android phone through Settings > System > Storage > Device storage. Here you can preview what data are using your internal storage and how much free storage you can use furtherly.
I have tried below solution and its work for me.
I have delete the caches folder from C: Drive. after an open project in an Android studio.
C:\Users\admin.AndroidStudio3.3\system\caches
Though the files within Android Studio appeared to be modified and filled with some garbage, I was able to open them with other editors and the data is still there.
Windows users, don't do this: "File > Invalidate Caches and Restart"
I have not found a way to restore this in Android Studio. But was able to copy and paste the file data from another editor and make it work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With