Gradle sync failed: Cannot set the value of read-only property 'outputFile'
错误
Gradle sync failed: Cannot set the value of read-only property 'outputFile'

原因
gradle打包,自定义apk名称代码报错
解决
看不懂代码就把原来的注释了,自己再写一个
例如:
// rename the apk with the version name
/*
applicationVariants.all { variant ->
variant.outputs.each { output ->
output.outputFile = new File(
output.outputFile.parent + "/${variant.buildType.name}",
"osc-android-${variant.versionName}-${variant.productFlavors[0].name}.apk".toLowerCase())
}
}
*/
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "oschain_${defaultConfig.versionName}.apk"
}
}
Gradle sync failed: Cannot set the value of read-only property 'outputFile'的更多相关文章
- Gradle sync failed: Gradle version 2.2 is required. Current version is 2.10.
Gradle sync failed: Gradle version 2.2 is required. Current version is 2.10. If using the gradle wra ...
- Gradle sync failed: failed to find Build Tools revision 21.1.2
从github上下载了一个开源项目到Android Studio 出现以下问题: 下午2:56:05 Gradle sync started下午3:00:11 Gradle sync failed: ...
- Android Studio 首坑 Gradle sync failed: Cause: error in opening zip file 的错误
前言 今天安装Android studio 2.3.1时发生了一个错误,安装完成后创建第一个Hello World项目是报错.经过这个百度后,结果没有一个靠谱的.将拆解经过记录一下. 环境: 操作系统 ...
- Gradle sync failed 异常
今天开发过程中出现如下异常 Gradle sync failed: Connection timed out: connect. If you are behind an HTTP proxy, pl ...
- Android Stutio 3.0 - Gradle sync failed
0.Android Studio 权威教程 (url:http://blog.csdn.net/column/details/zsl-androidstudio.html) 1. 项目老是报错: Gr ...
- 【error】Gradle sync failed: Unable to start the daemon process.【已解决】
---恢复内容开始--- 在克隆GIT项目后,Android Studio 报错: Gradle sync failed: Unable to start the daemon process. Th ...
- Android:Gradle sync failed: Another 'refresh project' task is currently running for the project
android studio 克隆项目后,重新导入后显示Gradle sync failed: Another 'refresh project' task is currently running ...
- Gradle sync failed: Read timed out
: Gradle sync started : Gradle sync failed: Read timed out Consult IDE log m s ms) 原因是Gradle下载超时 一.下 ...
- Gradle sync failed: Cause: org.gradle.logging.StyledTextOutput$Style Consult IDE log for more details
环境 Android studio 3.0 导入开源中国: ... dependencies { //noinspection GradleDependency classpath 'com.andr ...
随机推荐
- CSS动态定位
$(document).ready(function(){ $('body').on('click', '#start_timer', function() { var laydate = $(&qu ...
- software installing
<1>.Apache防火墙配置 firewall-cmd --add-service=http firewall-cmd --add-service=https 防火墙通过80和443端口 ...
- P1444 [USACO1.3]虫洞wormhole
luogu P1444 [USACO1.3]虫洞wormhole 首先感谢ghj的讲解 题目描述 农夫约翰爱好在周末进行高能物理实验的结果却适得其反,导致N个虫洞在农场上(2<=N<=12 ...
- Linux基本结构
Linux 的基本目录结构: 基本介绍: Linux 的文件系统是采用级层式的树状目录结构,在此结构中的最上层是根目录“/”,然后再次目录下载创建其他的目录. 经典的一句话:linu ...
- 1、Caffe数据层及参数
要运行Caffe,需要先创建一个模型(model),每个模型由许多个层(layer)组成,每个层又都有自己的参数, 而网络模型和参数配置的文件分别是:caffe.prototxt,caffe.solv ...
- 做point data的切面的时候的注意事项
正确的顺序应该是: 先导入cell data,再转换为point data,再做切面.结果如下: 如果这里导入cell data以后先做了切面再转换为point data,结果就是这样的: 很明显中间 ...
- Python爬虫常用之登录(二) 浏览器模拟登录
浏览器模拟登录的主要技术点在于: 1.如何使用python的浏览器操作工具selenium 2.简单看一下网页,找到帐号密码对应的框框,要知道python开启的浏览器如何定位到这些 一.使用selen ...
- centos 7 设置开机启动服务
2018-12-25 Centos7下添加开机自启动脚本和服务的方法 以docker 服务为例 1.centos7自带命令设置 systemctl enable docker.service 2.设置 ...
- Tomcat部署项目的三种方式
目录 1.下载 Tomcat 服务器 2.启动并部署 Tomcat 服务器 3.Tomcat 的目录结构 4.部署项目的第一种方法(项目直接放入 webapps 目录中) 5.部署项目的第二种方法(修 ...
- 小y的质数
题目链接:https://ac.nowcoder.com/acm/contest/634/C 链接:https://ac.nowcoder.com/acm/contest/634/C来源:牛客网 题目 ...