Gradle fails to resolve dependencies in Android Studio

后端 未结 8 820
野的像风
野的像风 2021-01-07 17:56

Whenever I add a dependency from an remote repository (jcenter) in Android Studio 1.1 (OS X) I get the following error upon syncing Gradle:

Error:(26, 13) Fa         


        
8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-07 18:45

    Tested in UBUNTU - 14.04 ,

    >delete .androidstudio1.2 , .gradle , .android  , Android studio project from home directory 
    > Launch using studio.sh
    >close the dialogue letting you choose new or old setting , just close it using that "x " button 
    > then it will set up an virtual nexus 5 
    >then there will be two errors saying problem about "sdk" and "gradle "
    > Caution : choose the appropriate sdk version by clicking on the link given by where the problem is shown .
    > close android studio 
    > reopen android studio 
    > then you will be thrown a possible  error with jdk not found .
    >go to file -> project structure 
    > give the path to jdk , in my case its "usr/local/java/jdk..."
    >close android studio and open again , the gradle might work well after this .
    

提交回复
热议问题