首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Android错误:未发布构建扫描

Android错误:未发布构建扫描
EN

Stack Overflow用户
提问于 2018-05-16 16:11:02
回答 3查看 9.6K关注 0票数 11

我正在Kotlin构建基本的应用程序。我添加了一个列表视图,它运行得很好。但是当我尝试实现谷歌地图时,我在AndroidStudio3.1中出现了如下错误。

代码语言:javascript
复制
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'.

我在网络上尝试了所有可用的解决方案,比如:

代码语言:javascript
复制
buildScan {
  licenseAgreementUrl = "https://gradle.com/terms-of-service"
  licenseAgree = "yes"
}

我还添加了插件:apply plugin: com.gradle.build-scan,但没有运气。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2018-07-26 09:48:31

只需从build.gradle文件中删除以下代码,并再次同步您的Gradle。一切都会解决的。

代码语言:javascript
复制
apply plugin: 'com.gradle.build-scan'

buildScan {
    licenseAgreementUrl = 'https://gradle.com/terms-of-service'
    licenseAgree = 'yes'
}
票数 4
EN

Stack Overflow用户

发布于 2020-07-27 08:03:10

The accepted answer in this other question works。您必须测试buildScan任务的存在。

代码语言:javascript
复制
if (hasProperty('buildScan')) {
    buildScan {
        termsOfServiceUrl = 'https://gradle.com/terms-of-service'
        termsOfServiceAgree = 'yes'
    }
}
票数 4
EN

Stack Overflow用户

发布于 2020-03-04 05:22:49

我刚刚同步了我的gradle文件,构建成功了

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50375559

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档