Gradle fails to resolve dependencies in Android Studio

后端 未结 8 861
野的像风
野的像风 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-07 18:40

    I had a similar problem with a library on github, which stated to install it as:

    dependencies {
        compile 'com.github.chrisbanes.photoview:library:1.2.4'
    }
    

    This workaround seem to work, although it's suboptimal because it doesn't fetch a specific version and leads to Android Studio warnings:

    dependencies {
        compile 'com.github.chrisbanes.photoview:library:+'
    }
    

提交回复
热议问题