欢迎关注朋友的公众号“证件照一键换底色”,可处理证件照(换背景、换底色、换正装)
在同事的Window平台上,利用gradle导入remote包的时候,出现了 “ Failed to resolve dependencies xxx”的错误,而我的Mac平台上却没有出现问题,经过一系列尝试,终于解决问题,应该是他的平台上没有认出 maven库吧。
原先的工程下面的build.gradle文件,注意不是app下面的build.gradle文件
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}
}
allprojects {
repositories {
jcenter()
}
}
之后调整后的工程下面的build.gradle文件
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral();
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
}
}
allprojects {
repositories {
jcenter()
mavenCentral();
}
}