Android Studio: Re-download dependencies and sync project

前端 未结 15 2107
孤街浪徒
孤街浪徒 2020-12-01 18:23

I downloaded an open source game \"ChaseWhisplyProject\" source code from Github.

I imported the project in my Android Studio (Version 1.5.1).

It shows foll

相关标签:
15条回答
  • 2020-12-01 18:42

    Clean Project is a way to go. After you clean project, make sure you rebuild it. Usually it solves the gradle issues for me.

    0 讨论(0)
  • 2020-12-01 18:43

    I face the same problem and I search for it and found a best solution and i works for me:

    1. Manually download Gradle 3.3 binary (direct link: https://services.gradle.org/distributions/gradle-3.3-bin.zip)

    2. Open your android studio root directory, and extract the zip to the gradle folder (for example: program files/android-studio/gradle/gradle-3.3)

    3. Open Android Studio, go to File->Settings-> (Build, Exectution, Deployment) >Gradle and set "Gradle home" to point your new gradle-3.3 folder.

    4. Apply and sync.

    0 讨论(0)
  • 2020-12-01 18:46

    Update your gradle version and update with required version of gradle and syn your project.

    https://services.gradle.org/

    0 讨论(0)
  • 2020-12-01 18:48

    It basically means that the gradle zip file in the cache folder is corrupted, if you don't want to change the version like the up-voted answer then you must delete the folder for your gradle version you're using for this project from the below path.

    Then just retry the sync and android studio will download it again

    C:\Users\ [user here]  \.gradle\wrapper\dists
    

    ex: if you're using 3.3 for this project you'd be deleting the folder

    C:\Users\[user here]\.gradle\wrapper\dists\gradle-3.3-all
    
    0 讨论(0)
  • 2020-12-01 18:53

    The close android studio then goes to the directory and you will find this type of folder. I saw in my pc. after deleted then clean project and sync. its works fine.

    you just delete from this directory C:\Users\ [user here] .gradle\wrapper\dists

    if you use 3.3 version in android studio. you can see like this C:\Users[user here].gradle\wrapper\dists\gradle-3.3-all

    0 讨论(0)
  • 2020-12-01 18:54

    In my case I was running IntelliJ IDEA as non root user.

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