Android Studio stuck on gradle resolving dependencies

后端 未结 15 1140
臣服心动
臣服心动 2020-12-04 22:11

I\'m new to Android Studio and while creating a new project it stuck at resolving dependencies :app:_debugCompile.

I waited for sometime and even tried

相关标签:
15条回答
  • 2020-12-04 22:36

    Check Your gradle.properties file it might be having some system Properties enables. Remove them, you may don't need them

    -systemProp.http.proxyPassword=password
    -systemProp.http.proxyHost=172.18.**.**
    -systemProp.http.proxyUser=user.name
    -systemProp.http.proxyPort=80
    

    Invalidate cache and restart Android studio.

    0 讨论(0)
  • 2020-12-04 22:40

    Killing the process or restarting the system helped me. Now it works perfectly fine...

    P.S: A quote from the sitcom The IT Crowd:

    Did you try turning it off and on again?
    
    0 讨论(0)
  • 2020-12-04 22:41

    I had a similar problem (after installing Android Studio and creating a new project this issue occurs). Adding the JAVA_HOME variable hepled to me. Quote from the official help:

    On some Windows systems, the launcher script does not find where Java is installed. If you encounter this problem, you need to set an environment variable indicating the correct location.

    Select Start menu > Computer > System Properties > Advanced System Properties. Then open Advanced tab > Environment Variables and add a new system variable JAVA_HOME that points to your JDK folder, for example C:\Program Files\Java\jdk1.7.0_21.

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