Wednesday, May 27, 2020

AndroidStudio Error: Cause: invalid LOC header (bad signature)

Cause: invalid LOC header (bad signature)

AndroidStudio imports the project, the operation fails, synchronization, error: Error: Cause: invalid LOC header (bad signature)
as shown below:
Cause: invalid LOC header (bad signature)

This is how I fixed "Error:Cause: invalid LOC header (bad signature)"
I fixed this problem by deleting caches folder which is located inside .gradle folder but it is not the ones inside the android project.
I deleted the one inside my home directory (C:\Users\{my name}\.gradle)
Steps:
Locate your home directory
Click File -> New -> import project -> Right Click or press ctrl + R-> Home Directory -> Copy URL (This is your home directory)
Open any folder and paste your Home URL
Look for ".gradle" folder
Look for and delete "caches" folder
Run your project from android studio.
Causes for this error: For me, my PC was out of memory while updating Android Studio from 3.3.1 to 3.4.1.
After I restarted PC, some of locally saved files were corrupted.
Good Luck!

No comments:

Post a Comment