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 ...
 
随机推荐
- SFML从入门到放弃(1) 窗口和交互
			
SFML从入门到放弃(1) 窗口和交互 创建一个新窗口: sf::RenderWindow window(sf::VideoMode(,),"new window"); 但是光创建 ...
 - 初探 模拟退火算法 POJ2420 HDU1109
			
模拟退火算法来源于固体退火原理,更多的化学物理公式等等这里不再废话,我们直接这么来看 模拟退火算法简而言之就是一种暴力搜索算法,用来在一定概率下查找全局最优解 找的过程和固体退火原理有所联系,一般来讲 ...
 - mysql 代价
			
mysql cbo cost base optimizer 基于代价,数据是一直变化的oracle8 以前是rbo rule base optimizer 基于规则, 如果sql使用了索引,必须使用索 ...
 - KEY
			
typedef struct st_key { uint key_length; /* Tot length of key */ ulong flags; /* dupp key and pack f ...
 - Ubuntu下Nginx安装
			
1.1 安装Nginx $sudo apt-get install nginx Ubuntu安装之后的文件结构大致为: 所有的配置文件都在/etc/nginx下,并且每个虚拟主机已经安排在了/etc/ ...
 - [BZOJ 1937][Shoi2004]Mst 最小生成树
			
传送门 $ \color{red} {solution:} $ 对于每条树边\(i\),其边权只可能变小,对于非树边\(j\),其边权只可能变大,所以对于任意非树边覆盖的树边有 \(wi - di & ...
 - shell (2) 时间处理
			
获取当前的时间,并输出 #!/bin/bash if [ $# -ne 1 ];then echo "input an dmesg time" exit 1 fi unix_tim ...
 - system命令
			
服务查看 查看所有服务运行状态: service --status-all chkconfig --list 查看单个服务的运行状态 service sshd status 查看启动状态,是否开机自动 ...
 - 解决视图状态消息验证代码 (MAC) 错误
			
https://blog.csdn.net/bingtingabc/article/details/49148745 2015年10月15日 10:05:56 bingtingabc 阅读数:3397 ...
 - Zookeeper---系统学习
			
1.概述 1.1 Zookeeper解决了什么问题? 分布式环境中 协调和管理服务 是一个复杂的过程: Zookeeper通过 其简单的架构和API 解决了这个问题,Zookeeper ...