Could not find property 'outputFile' on com.android.build.gradle.internal.api.ApplicationVariantImpl, even following previous answers

I had this infamous error when upgrading from AS 0.8 to Android Studio 1.0 RC4.

I already saw the question here: Couldn't find property 'outputFile' on com.android.build.gradle.internal.api.ApplicationVariantImpl and tried to adapt the code but with no success.

So I tried by commenting out applicationVariants so that this outputFile was not declared anywhere but still got the error (?)

Then I invalidate the cache using the option in File-> Invalidate Caches / Restart, but again with no effect.

Finally, I deleted the .gradle directory in my project folder, but still got an error when trying to sync.

Does anyone have any other suggestions to fix it?

+3


source to share


2 answers


Make sure the gradle plugins you are using (buildscript dependencies from build.gradle) are updated and adapted to work with gradle plugin 1.0.0.



I had the same problem and it was related to this fact. I used the old version'com.stanfy.spoon:spoon-gradle-plugin'

+6


source


I figured out that the problem was in android.gradle:



change classpath 'com.android.tools.build:gradle:1.0.0-rc4'

since classpath 'com.android.tools.build:gradle:0.14.2'

decided it

0


source







All Articles