4

My laptop crashed while Android Studio was running. Now, When I tried to open project in Android Studio it gives me weird error and no project is opening.

Cannot load project: java.lang.RuntimeException: java.io.IOException: java.lang.AssertionError: Unexpected content storage modification"**

Edit: Also I'm in the welcome screen of Android Studio and have no access to Menu options to Invalidate Caches and restart Android Studio.

MuTiny
  • 261
  • 1
  • 7
  • 23
Crawler
  • 1,988
  • 3
  • 21
  • 42

7 Answers7

22

I had really big issue as I was not able to open project in Android Studio. Every time I start Android Studio dialog box appear that says:

Cannot load project: java.lang.RuntimeException: java.io.IOException: java.lang.AssertionError: Unexpected content storage modification

I solved it by doing following steps:

  1. Close Android Studio
  2. Go to the directory home_dir/.AndroidStudio/system/cache
  3. Remove all the files in the cache directory.
  4. Then restart IntelliJ
MuTiny
  • 261
  • 1
  • 7
  • 23
Crawler
  • 1,988
  • 3
  • 21
  • 42
4

No guarantee this will work, but I have previously fixed a problem which is similar to this by invalidating the cache.

In Android Studio this is under File -> Invalidate Caches / Restart

garyh
  • 2,782
  • 1
  • 26
  • 28
Alt-Cat
  • 5,392
  • 1
  • 15
  • 16
2

For Android Studio 2.O follow these steps:

  1. Close Android studio
  2. Go to ~/.android/cache
  3. Delete content
  4. Restart android studio

Hope this will help

MuTiny
  • 261
  • 1
  • 7
  • 23
iwooli
  • 177
  • 1
  • 12
1

I found the same issue but I found a fix, and all it took was renaming/deleting the .AndroidStudio hidden folder in Windows, under your home directory.

C:\Users\YOURUSERNAME.AndroidStudio

I renamed mine and I'm back up and running.

MuTiny
  • 261
  • 1
  • 7
  • 23
SAM
  • 399
  • 2
  • 9
1
  1. In C\users\.Androidstudio delete gradle.jar and try
  2. Backup the jar before proceeding.

I got the same issue and this is related to IDE .

Android Studio has to do a fix.

ItamarG3
  • 4,092
  • 6
  • 31
  • 44
0
  1. Start Android Studio, close any open project.
  2. On the right side, click on Configure -> Settings.
  3. On the left side, in Compiler->Gradle set VM Options to -Xmx512m
  4. Press OK, then create a project. Worked for me.

also because of that

It turns out it's a Windows 8 issue with the available virtual memory. It seems like a few new processes (like Superfetch) eat up a ton of processing power to constantly scan your drive for changes, so searching is faster.

The solution is to change the min and max virtual memory values. Here's how to do that:

http://windows.microsoft.com/en-us/windows/change-virtual-memory-size#1TC=windows-7

ItamarG3
  • 4,092
  • 6
  • 31
  • 44
0

I could solve this issue in android studio by selecting File-> Invalidate caches/Restart .

Liya
  • 568
  • 7
  • 28