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

后端 未结 8 1661
半阙折子戏
半阙折子戏 2021-01-04 02:12

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 th

相关标签:
8条回答
  • 2021-01-04 02:37

    Error: Gradle sync failed: Cause: invalid stream header: 005C0044, 000900D9, ... or other some of the Gradle sync failed

    There is a good method for this issue. you should update the android gradle as following in three steps:

    1) Download latest gradle version form link: https://gradle.org/releases/

    2) Unzip the download file and copy it in address: C:\Program Files\Android\Android Studio\gradle

    3) In the android studio, change gradle version to the latest gradle version (4.5.1 based on the unzip file, which had been named as the gradle-4.5.1) in path: File>Project structure>Project>gradle version

    4) In the android studio, change the gradle home file (File>Settings>Build,Execution,Development>gradle>gradle home) to address: C:\Program Files\Android\Android Studio\gradle\gradle-4.5.1.

    0 讨论(0)
  • 2021-01-04 02:42

    Go to your console, run

    ./gradlew --stacktrace
    

    If it says

    GradleException: Could not read cache value from '[...]/.gradle/daemon/3.3/registry.bin'
    

    go to this folder and delete the file registry.bin.lock. No need to delete the whole .gradle directory and download everything again.

    0 讨论(0)
  • 2021-01-04 02:44

    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.

    0 讨论(0)
  • 2021-01-04 02:45

    This Works

    Delete

    caches in .gradle 
    caches in folder where your android studio project is located
    delete all iml files
    delete .gradle in folder where your project is located
    

    happy coding

    0 讨论(0)
  • 2021-01-04 02:48

    I noticed that many users (me included) faced this issue using the 3.3 gradle version; update to 3.5 and it will be fine

    0 讨论(0)
  • 2021-01-04 02:48

    Andrea's answer worked for me, too (i.e. upgrading gradle from 3.3 to 3.5). For the shake of completeness, I'd just like to add that you can update gradle in your Android Studio by going to:

    File > Project Structure > Project

    You might have to update your Android Plugin Version, too. Check the version compatibility table for more information.

    0 讨论(0)
提交回复
热议问题