4

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

I saw already the question here: Could not 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 the applicationVariants not to have this outputFile declared anywhere but still get 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 the error when trying to synchronise.

Do anyone have other suggestions on how to fix it?

Community
  • 1
  • 1
Noya
  • 3,879
  • 3
  • 26
  • 32

2 Answers2

6

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

I had the exact same problem and it was due to this fact. I was using an old version of 'com.stanfy.spoon:spoon-gradle-plugin'

Catalin Morosan
  • 7,897
  • 11
  • 53
  • 73
0

I figure it out the problem was in the android.gradle:

changing classpath 'com.android.tools.build:gradle:1.0.0-rc4' with classpath 'com.android.tools.build:gradle:0.14.2' solved it

Noya
  • 3,879
  • 3
  • 26
  • 32
  • 3
    They are constantly tweaking Gradle plugin and its functions, so the cause of the problem is that the function you are using has been removed. It's not a good move to just go back to use old version instead of migrating to the latest one. – Kai Dec 07 '14 at 15:42