错误

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'的更多相关文章

  1. 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 ...

  2. 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: ...

  3. Android Studio 首坑 Gradle sync failed: Cause: error in opening zip file 的错误

    前言 今天安装Android studio 2.3.1时发生了一个错误,安装完成后创建第一个Hello World项目是报错.经过这个百度后,结果没有一个靠谱的.将拆解经过记录一下. 环境: 操作系统 ...

  4. Gradle sync failed 异常

    今天开发过程中出现如下异常 Gradle sync failed: Connection timed out: connect. If you are behind an HTTP proxy, pl ...

  5. Android Stutio 3.0 - Gradle sync failed

    0.Android Studio 权威教程 (url:http://blog.csdn.net/column/details/zsl-androidstudio.html) 1. 项目老是报错: Gr ...

  6. 【error】Gradle sync failed: Unable to start the daemon process.【已解决】

    ---恢复内容开始--- 在克隆GIT项目后,Android Studio 报错: Gradle sync failed: Unable to start the daemon process. Th ...

  7. 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 ...

  8. Gradle sync failed: Read timed out

    : Gradle sync started : Gradle sync failed: Read timed out Consult IDE log m s ms) 原因是Gradle下载超时 一.下 ...

  9. 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 ...

随机推荐

  1. Hbase的安装与测试

    实验环境 虚拟机伪分布式 Ubuntu 17.10 JDK 1.8 Hadoop 2.7.6 Hbase 1.3.3 ①安装和配置HBase. 首先从官网http://archive.apache.o ...

  2. gitlab迁移版本库(保留原版本库的所有内容)

    如果你想从别的 Git 托管服务那里复制一份源代码到新的 Git 托管服务器上的话,可以通过以下步骤来操作. 1) 从原地址克隆一份裸版本库,比如原本托管于 GitHub git clone --ba ...

  3. 百度直接搜IP可以查看本机外网IP

    百度直接搜IP可以查看本机外网IP ipconfig在控制台查看的是内网IP

  4. [Swift]在Swift中实现自增(++)、自减(--)运算符:利用extension扩展Int类

    自增(++).自减(--)运算符主要用在For循环中,Swift有自己更简易的循环遍历方法,而且类似x- ++x这种代码不易维护. Swift为了营造自己的编码风格,树立自己的代码精神体系,已经不支持 ...

  5. leetcode-819-Most Common Word(词频统计)

    题目描述: Given a paragraph and a list of banned words, return the most frequent word that is not in the ...

  6. 2016级算法第四次上机-B ModricWang的序列问题

    1019 ModricWang的序列问题 思路 此题题意非常清晰,给定一个序列,求出最长上升子序列的长度.从数据规模来看,需要\(O(nlogn)\) 的算法. \(O(nlongn)\) 求最长上升 ...

  7. anaconda安装出现failed to create anacoda menue

    1.卸载Anaconda后重新安装Anaconda出现各种问题,粗暴解决方式:直接将安装目录放在C盘主路径下,完美解决. 2.然后无选择忽略,忽略,忽略,提示安装成功,依旧没有 菜单 进入 cmd,找 ...

  8. vue-cli项目启动遇到的坑

    利用 npm init webpack projectname 之后 切换到项目所在文件夹下,执行命令 npm install ,一直非常慢,卡在那里基本不动. 最后是利用cnpm 安装成功的. 转载 ...

  9. Js框架设计之DomReady

    一.在介绍DomReady之前,先了解下相关的知识 1.HTML是一种标记语言,告诉我们这页面里面有什么内容,但是行为交互则要通过DOM操作来实现,但是注意:不要把尖括号里面的内容看作是DOM! 2. ...

  10. redis和memcache缓存击穿,缓存失效问题

    我们在用缓存的时候,不管是Redis或者Memcached,基本上会通用遇到以下三个问题: 缓存穿透 缓存并发 缓存失效 一.缓存穿透 Paste_Image.png Paste_Image.png ...