Cocould not find property 'outputfile' on com. android. build. gradle. internal. api. ApplicationVariantImpl, androidgradle
After Android studio is upgraded from 1.0 RC 4 to 1.0 (in fact, an 8 m patch is installed), the corresponding gradle version will directly use "com. android. tools. build: gradle: 1.0.0 ". If you use outputFile in the gradle file, the above problem will occur. Well, this is actually a problem for the gradle team. Sometimes we want gradle to have a very good compatibility with the old version like android.
Let's talk about how to solve this problem. The reason for this problem is that the outputFile function has been replaced.
Old:
applicationVariants.all { variant -> ...... variant.outputFile = new File(variant.outputFile.parent, name); ...... }}
New:
applicationVariants.all { variant -> ...... variant.outputs.each { output -> output.outputFile = new File(output.outputFile.parent, name); ...... }}
If you change it as described above, it will be OK.