我在这上面花了几天的时间,每次我修复一个Android的错误,就会出现两个新的错误。
我在一个Cordova项目中工作,在我将我的andrid SDK更新到API 26停止工作后,gradle总是失败。

SDK管理器

我的build.gradle:
apply plugin: 'com.android.application'
buildscript {
repositories {
mavenCentral()
jcenter()
}
// Switch the Android Gradle plugin version requirement depending on the
// installed version of Gradle. This dependency is documented at
// http://tools.android.com/tech-docs/new-build-system/version-compatibility
// and https://issues.apache.org/jira/browse/CB-8143
dependencies {
classpath 'com.android.tools.build:gradle:2.2.1'
}
}
// Allow plugins to declare Maven dependencies via build-extras.gradle.
allprojects {
repositories {
mavenCentral();
jcenter()
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
}非常感谢您的帮助
发布于 2017-12-15 04:37:33
与Android8.0兼容的最新支持库需要使用谷歌新的
将此代码添加到您的代码中:
repositories {
google()
// If you're using a version of Gradle lower than 4.1, you must instead use:
// maven {
// url 'https://maven.google.com'
// }
}https://stackoverflow.com/questions/47821098
复制相似问题