* 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