我正在尝试在我遵循此链接的Android项目中进行gradle构建扫描。
这是我的顶层的gradle文件。
buildscript {
ext.kotlin_version = '1.2.71'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.firebase:firebase-plugins:1.1.5'
}
}
plugins {
id 'com.gradle.build-scan' version '1.16'
}
buildScan {
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
licenseAgree = 'yes'
}
ext {
compileSdkVersion = 27
minSdkVersion = 16
targetSdkVersion = 27
zendeskSdkVersion = "2.0.0"
appCompatVersion = "27.0.2"
}
allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
}
当我尝试与Gradle文件同步项目时出现此错误
Plugin [id: 'com.gradle.build-scan', version: '1.16'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.gradle.build-scan:com.gradle.build-scan.gradle.plugin:1.16')
Searched in the following repositories:
Gradle Central Plugin Repository
Open File