Error:Cause: invalid stream header: 000900D9 in android studio 2.3.1

Suraj Bahadur picture Suraj Bahadur · Apr 18, 2017 · Viewed 9.3k times · Source

I am using android studio 2.3.1 and it was working fine yesterday But now it throw me an error Error:Cause: invalid stream header: 000900D9 this message throw from Messages Gradle Sync dialog.

Below are the steps which i did to fixed this problem but nothing works for me

1.invalidate cache and restart

  1. Delete scripts and scripts-remapped files from C:\Users\suraj.gradle\caches\3.3

and also checked many post in stackoverflow but nothing work for me and most of the questions put here are not answered by anyone yet .

Under my project structure

Compile Sdk version :Api 25

Build tool version :25.0.2

Answer

Michael picture Michael · Apr 19, 2017

I was facing the same problem and was not able to figure out what exactly causes this problem.

But removing the whole .gradle folder (/home/$USER/.gradle in my case) and rebuilding the app fixed it.