Android开发报错: Authentication scheme ‘all’(Authentication) is not supported by protocol ‘file’

来源:互联网 发布:网络是把双刃剑章郑 编辑:程序博客网 时间:2024/05/01 01:56

   将Gradle从1.5升级到2..0以上的时候,有时编译会报这个错:Authentication scheme ‘all’(Authentication) is not supported by protocol ‘file’

  一种解决方法是:将原项目的build.gradle文件中的这段:

allprojects {    repositories {        jcenter()        mavenCentral()        maven { url 'https://maven.fabric.io/public' }        maven { url getMavenRepoUrl()             credentials {                 username getMavenUsername()                password getMavenApiKey()             }         }        flatDir {            dirs 'libs'        }    }}

改成:

allprojects {    repositories {        jcenter()        mavenCentral()        maven { url 'https://maven.fabric.io/public' }        maven { url "https://jitpack.io" }        flatDir {            dirs 'libs'        }    }}

对比修改其中不同的地方即可,在我的项目里测试通过,希望对大家有用。

1 0
原创粉丝点击