Could not find property 'outputFile

* What went wrong:
A problem occurred configuring project ':app'.
> Could not find property 'outputFile' on com.and[email protected]7d035e8.

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

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

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

Could not find property 'outputFile

时间: 2024-08-30 09:58:25

Could not find property 'outputFile的相关文章

Could not find property 'outputFile' on com.android.build.gradle.internal.api.ApplicationVariantImpl

Android studio从1.0 RC 4升级到1.0(其实就是打了一个8M的patch)后,这个时候相应的gradle的版本也会直接使用"com.android.tools.build:gradle:1.0.0",如果这时你在gradle文件中又用到outputFile就会出现上述的问题.好吧,其实这也是gradle团队搞的问题,有时候我们多希望gradle能像android一样,对旧版本有一个非常好的兼容性. 废话不多说,直接说怎么解决这个问题吧,这个问题的原因是outputF

android studio升级3.0版本,问题处理

android studio升级3.0版本,问题处理 问题1:编译版本与构建版本修改 compileSdkVersion : 26, buildToolsVersion : "26.0.2", gradle版本: distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip classpath 'com.android.tools.build:gradle:3.0.0' 问题2:apk名称配置调

用android studio运行weex项目错误汇总

在本地使用命令weex run android运行weex项目时报错:"Error: No android devices found.",后面发现这是个坑,需要使用android studio启动项目来运行. 在本地下载安装好android studio环境和工具后,将weex项目下platforms->android文件引入(如果是ios则引入ios文件夹),然后编译运行,在编译运行中遇到了如下几个问题,在此汇总记录: 1.Could not find com.android

python中的property

property(fget=None, fset=None, fdel=None, doc=None) -> property attribute fget is a function to be used for getting an attribute value, and likewise fset is a function for setting, and fdel a function for del'ing, an attribute. Typical use is to defi

Cannot read property 'Store' of undefined nodejs express session

Express在使用mongodb的时候app配置出错!  "Cannot read property 'Store' of undefined" 原因主要是express版本4++问题 //settings.js module.exports={ cookieSecret:"xxxx", db:"dbname", host:"localhost", } //app.js var express = require("

uva 10526 - Intellectual Property(后缀数组)

题目链接:uva 10526 - Intellectual Property 题目大意:给定两个文本,问说下面一个文本中在哪些位置上抄袭了上面个一个文本的,输出n个抄袭位置(不足n个情况全部输出),按照长度优先输出,长度相同的输出位置靠前的. 注意:空格,回车都算一个字符:一段字符只能是抄袭上面的一部分,比如上:NSB*SB 下:NSB 答案:NSB. 解题思路:将两个文本连接在一起,中间用没有出现的字符分割,然后处理处后缀数组,根据height数组的性质,求出哪些位置匹配的长度不为0(注意匹配

webpack报错:Cannot assign to read only property 'exports' of object '#<Object>'

这个倒霉错误在mac电脑上开发的时候非常顺利,可是用windows的时候就会报错. 百度查不到,google一查果然有. 原因是:The code above is ok. You can mix require and export. You can't mix import and module.exports. 也就是说,在webpack打包的时候,可以在js文件中混用require和export.但是不能混用import 以及module.exports. 于是查了一下代码,在自己的ma

JavaScript中的property和attribute的区别

时间: 2013-09-06 | 10:24 作者: 玉面小飞鱼 分类: DOM, js相关, 前端技术 2,222 次浏览 1. 定义 Property:属性,所有的HTML元素都由HTMLElement类型表示,HTMLElement类型直接继承自Element并添加了一些属性,添加的这些属性分别对应于每个HTML元素都有下面的这5个标准特性: id,title,lang,dir,className.DOM节点是一个对象,因此,他可以和其他的JavaScript对象一样添加自定义的属性以及方

staticmethod classmethod property方法

@staticmethod 静态方法 函数修饰符,用来修饰一个函数,类似于装饰器 class Dog(object): def __init__(self,name): self.name = name def eat(self,food): print('%s is eating %s'%(self.name,food)) d = Dog('二哈') d.eat('包子') #二哈 is eating 包子 eat()方法上面加上 @staticmethod class Dog(object)