Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No such property: scope for class: com.android.build.gradle.internal.variant.ApplicationVariantData

After updating to Android Studio 4 I got this error: A problem occurred configuring project ':app'.

groovy.lang.MissingPropertyException: No such property: scope for class: com.android.build.gradle.internal.variant.ApplicationVariantData

My gradle:

classpath 'com.android.tools.build:gradle:4.1.0-alpha10' 

gradle-wrapper.properties:

https://services.gradle.org/distributions/gradle-6.5-bin.zip 
like image 878
Dima Avatar asked Jun 04 '20 15:06

Dima


2 Answers

I had the same issue. Removing all fabric references in build.gradle solved my case.

you can try to remove

apply plugin: 'io.fabric' 

and

classpath 'io.fabric.tools:gradle:1.31.2' 

lines from your build.gradle file.

Fabrics Crashlytics deprecated. If you are using Fabric Crashlytics you can replace it with Firebase Crashlytics.

like image 84
ycannot Avatar answered Sep 23 '22 03:09

ycannot


I had the same problem, in particular with the the same stack trace as @display name (on the comments).

From there I noticed the reference to Crashlytics. And effectively that was the issue: the old, deprecated, version (from Fabric). Migrating to the new Firebase Crashlytics fixed the issue for me.

like image 36
ianribas Avatar answered Sep 20 '22 03:09

ianribas