* What went wrong:
A problem occurred configuring project ':app'.
> Could not find property 'outputFile' on com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated@7d035e8.

今天在打开一个旧的项目时,提示竟然编译不过。提示内容如上。

原因是gradle及对应的gradle-android插件更新,导致一些API发生变化,比如variant.outputFile已经不使用了,而改用outputs代替。而我原来为了重命名APK,使用了这一个属性,导致出错。

解决方法很简单,把variant.outputFile改为variant.outputs[0].outputFile即可。

Could not find property 'outputFile的更多相关文章

  1. Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated{...

    转载请标明出处:https://www.cnblogs.com/tangZH/p/10764568.html 在做多渠道打包的时候出现了这个错误,在高版本的gradle出现. 具体错误为:Cannot ...

  2. 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名称代 ...

  3. 【Android Studio使用教程 7】AndroidStudio问题汇总

    FindBugs:Compiler output path for module can not be null. check your module/project settings问题原因 And ...

  4. 更新Android Studio 3.0碰到的问题

    更新完后试下运行正在维护的旧项目,出现各种错误,因为后来发现问题不在这,所以没记完整,大概如下: A larger heap for the Gradle daemon is recommended ...

  5. Android Studio 中修改Apk名称

    修改生成的apk名称,并且使调试时也可以使用. 在app->build.gradle 中增加以下内容: android.applicationVariants.all { variant-> ...

  6. 升级到 Android Studio 3.0 + Gradle 4.1 遇到的一些坑及解决方案

    问题一: Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated{apkD ...

  7. Android Studio 3.0正式版填坑之路

    原文:https://www.jianshu.com/p/9b25087a5d7d   Android Studio 3.0启动图 序言 总看别人的文章,今天尝试着自己来写一篇.在逛论坛时候,无意间发 ...

  8. AndroidStudio3.0以上版本的坑

    原文:https://blog.csdn.net/ytfunnysite/article/details/78864556 1.Error:Failed to resolve: com.android ...

  9. 浅谈Android Studio3.0更新之路(遇坑必入)

    >可以参考官网设置-> 1 2 >> Fantasy_Lin_网友评论原文地址是:简书24K纯帅豆写的我也更新一下出处[删除]Fa 转自脚本之家 浅谈Android Studi ...

随机推荐

  1. python学习之路基础篇(第八篇)

    一.作业(对象的封装) 要点分析 1.封装,对象中嵌套对象 2.pickle,load,切记,一定要先导入相关的类二.上节内容回顾和补充 面向对象基本知识: 1.类和对象的关系 2.三大特性: 封装 ...

  2. python笔记五(条件判断/循环/break和continue)

    一 条件判断 if <条件判断1>: <执行1> elif <条件判断2>: <执行2> elif <条件判断3>: <执行3> ...

  3. webpack4新建一个项目

    Create a new directory mkdir webpack-4-quickstart Initialize a package.json by running: npm init -y ...

  4. Jmeter(六)_前置处理器

     BeanShell PreProcessor  使用BeanShell在请求进行之前进行操作.语法使用与BeanShell Sampler是一样的.但可使用的内置变量稍有不同 参考示例 Jmeter ...

  5. 手势监听GestureDetector 案例

    以下只做长按和甩出(用户按下朝某一方向甩动手指)案例 OnGestureListener可以查看到更多的手势事件 案例 package com.qf.mobliesafe.activity; impo ...

  6. Spring Security安全框架入门篇

    一.Spring Security相关概念 1.1..Spring Security介绍: Spring Security是一个能够为基于Spring的企业应用系统提供声明式的安全访问控制解决方案的安 ...

  7. Android-Chart

    MPAndroidChart 包括折线图.曲线图.柱形图.饼图.K线图等等 我的地址:https://github.com/kongqw/MPAndroidChart 开源地址:https://git ...

  8. Matplotlib Toolkits:python高级绘图库seaborn

    http://blog.csdn.net/pipisorry/article/details/49515745 Seaborn介绍 seaborn (Not distributed with matp ...

  9. Freeline--Android平台上的秒级编译方案

    Freeline 技术揭秘 Freeline是什么? Freeline是蚂蚁金服旗下一站式理财平台蚂蚁聚宝团队15年10月在Android平台上的量身定做的一个基于动态替换的编译方案,5月阿里集团内部 ...

  10. UIScrollView实现图片轮播器的无限滚动

    简介 在现在的一些App中常常见到图片轮播器,一般用于展示广告.新闻等数据,在iOS内并没有现成的控件直接实现这种功能,但是通过UIScrollView的允许分页设置,可以实现滚动轮播的功能. 轮播原 ...