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 ...
随机推荐
- 深入了解java虚拟机(JVM) 第四章 对象的创建
一.对象的创建过程 对象的创建过程大致可以分为六步,其中对象的分配尤为重要: 二.对象分配内存 一般来说对象分配内存有两种方式: 第一种是指针碰撞,这是一种比较理想的方式:如果Java堆是绝对规整的: ...
- 如何提高scrapy的爬取效率
提高scrapy的爬取效率 增加并发: 默认scrapy开启的并发线程为32个,可以适当进行增加.在settings配置文件中修改CONCURRENT_REQUESTS = 100值为100,并发设置 ...
- P3648 [APIO2014]序列分割
传送门 首先容易证明,得分和切的顺序没有关系 所以直接默认先切左边再切右边就好了 然后显然可以 $dp$ 一开始想的是设 $f[i][j]$ 表示切了 $i$ 次,此次把 $j$ 和 $j+1$ 分开 ...
- 128th LeetCode Weekly Contest Capacity To Ship Packages Within D Days
A conveyor belt has packages that must be shipped from one port to another within D days. The i-th p ...
- js 下不同浏览器,new Date转换结果时差
项目中在android上使用XWalkView作为浏览器,发现在解析时间的时候解析结果和实际结果有时差. android联机调试的截图如下: PC本机调试截图如下: 从android联机调试的截图看, ...
- 关于dedecms数据量大以后生成目录缓慢的问题解决
四月份的时候博客被封.我不知情.因为一直很忙,没有来得及看.前两天来看以后,发现居然被封,吓傻了我. 赶紧找原因,原来是转载了某个人的博文,被他举报了,然后就被封了. 觉得很伤心,毕竟这个博客陪伴了我 ...
- 小白详细解析C#反射特性实例
套用MSDN上对于反射的定义:反射提供了封装程序集.模块和类型的对象(Type 类型).可以使用反射动态创建类型的实例,将类型绑定到现有对象,或从现有对象获取类型并调用其方法或访问其字段和属性.如果代 ...
- SpringCloud---分布式配置中心---Spring Cloud Config
1.概述 1.1 Spring Cloud Config是Spring Cloud的一个全新项目: 作用:为分布式系统中的基础设施.微服务应用提供集中化的外部配置支持: 分为服务端.客户端2个 ...
- CSAPP阅读笔记-struct, union, 数据对齐-来自第三章3.9的笔记-P183-P191
1.数据对齐 为什么要对齐:通俗点解释就是CPU对数据访问时,每次都是取固定数量的字节数,假如一次取4个字节,若有个int存在0x01-0x04,则一次就能取出,若存在0x03-0x06,则需要分两次 ...
- Android Notification 的四种使用方式
实现通知步骤 一般实现通知需要如下步骤: 1.获取 NotificationManager 实例管理通知: 2.实例 Notification 对象: 3.管理事件 Intent: 4.发送通知. 注 ...