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"); 但是光创建 ...
- dotnet core2常用命令
dotnet --info 来查看是否安装成功dotnet new -alldotnet new mvc 创建MVC项目dotnet new more 查看项目类型dotnet restore (恢复 ...
- ubuntu->桌面版-常用设置
1.目前使用unity桌面 ,使用Gnome,未来将会采用 Qt/QML 语言写的桌面 2.汉化 系统: 在 设置(setting)->语言支持(language support)->选择 ...
- [整理] Nginx Location 匹配规则
目录 规则语法 location 分类 匹配顺序: 扩展 location / {}和 location =/ {}的区别 如何快速测试 规则语法 语法 匹配规则 空 普通匹配(遵循最大前缀匹配规则, ...
- Eclipse中的常见设置
本文将移到下面的博客维护: 新的博客网址 当新建一个workspace时,习惯做下面的设置: 1. 在eclipse中,默认的Text file encoding是GBK(操作系统是中文简体):如果操 ...
- 感想篇:7)知其然与知其所以然,KnowHow与KnowWhy
本章目的:探究--知其然与知其所以然,KnowHow与KnowWhy. 1.Know-How体系与代价: 100多年的汽车研发历史表明,企业只有开发过两代车以上才能逐步建立和完善Know-How体系. ...
- struts2后台向前台传值为空
今天遇到了一个bug,在后台定义了一个list,然后在前台展示,结果前台接手到的一直是个空,然后找了半天最后才知道是名字名字的问题,这个变量是第一个字母小写,然后第二个字母大写了,然后自动生成的get ...
- 认识CSS中css引入方式、选择器、文本样式设置以及显示模式
前端之HTML.CSS(三) CSS CSS-Cascading Styles Sheets,层叠样式表.用于网页的表现,主要用于布局和修饰网页. CSS引入方式 CSS的三种引入方式:行内样式,内部 ...
- JS中将XML转为JSON对象
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.js"></script> <scr ...
- Ubuntu安装google-chrome
原文地址:http://www.linuxidc.com/Linux/2013-10/91857.htm安装谷歌浏览器,只需要三行代码: 打开终端,输入 cd /tmp 对于谷歌Chrome32位版本 ...