1

Android studio couldn't load project settings from project.iml and app.iml

I deleted those files and restarted Android Studio

Now I can't open any file inside the project.

in every file i see this:

<component name="libraryTable">
  <library name="com.google.firebase:firebase-crash-license-12.0.0">
    <CLASSES>
      <root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/firebase-crash-license-12.0.0.aar/4af1d2fd848fb29a90a1c9eb639021c5/jars/classes.jar!/" />
      <root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/firebase-crash-license-12.0.0.aar/4af1d2fd848fb29a90a1c9eb639021c5/res" />
    </CLASSES>
    <JAVADOC />
    <SOURCES />
  </library>
</component>   

Any ideas?

WoW
  • 151
  • 2
  • 9

3 Answers3

2

I had the same problem. I tried "Invalidate Caches", delete folders ".gradle", ".iml" and ".idea" and it didn't help. Finally I installed android preview and it works.

And 5 minutes ago I found another solution. I have fixed this problem by deleting the folder AndroidStudio3.4\system\caches.

Anna
  • 503
  • 4
  • 12
1

Faced same problem, here's a solution worked for me.

  1. Copy the corrupted project directory.
  2. Paste it at somewhere else.
  3. Import it in Android Studio. (File-> New-> Import project)
  4. And uncorrupted project get restored.

PS: You must have original corrupted project. (Means, copy it without tampering project structure)

0

I think for two possible solutions for this issue:

  1. File -> Invalidate Caches/Restart....

  2. Delete the folder caches inside .gradle and reopen the project. This way the Gradle will start downloading the dependencies and will cache them again.

Slavi Petrov
  • 320
  • 6
  • 12