我正在Kotlin构建基本的应用程序。我添加了一个列表视图,它运行得很好。但是当我尝试实现谷歌地图时,我在AndroidStudio3.1中出现了如下错误。
The build scan was not published due to a configuration problem.
The Gradle Cloud Services license agreement has not been agreed to.
To agree to the license, include the following in your root project's configuration:
buildScan { licenseAgreementUrl = 'https://gradle.com/terms-of-service'; licenseAgree = 'yes' }
For more information, please see https://gradle.com/scans/help/plugin-license.
Alternatively, if you are using Gradle Enterprise, specify the server location.
For more information, please see https://gradle.com/scans/help/plugin-enterprise-config.
9:27:52 PM: Task execution finished 'signingReport'.我在网络上尝试了所有可用的解决方案,比如:
buildScan {
licenseAgreementUrl = "https://gradle.com/terms-of-service"
licenseAgree = "yes"
}我还添加了插件:apply plugin: com.gradle.build-scan,但没有运气。
发布于 2018-07-26 09:48:31
只需从build.gradle文件中删除以下代码,并再次同步您的Gradle。一切都会解决的。
apply plugin: 'com.gradle.build-scan'
buildScan {
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
licenseAgree = 'yes'
}发布于 2020-07-27 08:03:10
The accepted answer in this other question works。您必须测试buildScan任务的存在。
if (hasProperty('buildScan')) {
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
}发布于 2020-03-04 05:22:49
我刚刚同步了我的gradle文件,构建成功了
https://stackoverflow.com/questions/50375559
复制相似问题