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

后端 未结 9 2141
误落风尘
误落风尘 2020-12-30 18:26

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

groovy.lang.MissingPropertyException: No such pr

相关标签:
9条回答
  • 2020-12-30 18:52

    Remove all that connected with deprecated library such as fabric crashlytics etc.

    0 讨论(0)
  • 2020-12-30 18:54

    This started happening for me when upgrading Android Studio from 4.0.2 to 4.1. Unfortunately I had to update a branch which still includes fabric, the only way I could get it working was to downgrade android studio and make the fixes and be able to make a new build.

    Download old versions here:

    Windows: https://android-studio.en.uptodown.com/windows/versions

    Mac: https://android-studio.en.uptodown.com/mac/versions

    0 讨论(0)
  • 2020-12-30 18:55

    Please update your Gradle dependency to:

    classpath "com.android.tools.build:gradle:4.0.0"
    

    and in gradle-wrapper.properties

    distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
    
    0 讨论(0)
  • 2020-12-30 18:56

    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.

    0 讨论(0)
  • 2020-12-30 19:07

    Update in OCTOBER 2020 : Fabric is deprecated, so remove all plugin and dependency depend on Fabric.io

    like :

    apply plugin: 'io.fabric'
    
    
    classpath 'io.fabric.tools:gradle:1.31.2'
    
    
    
    maven {
            url 'https://maven.fabric.io/public'
        }
    

    and after deletaion you must add :

     classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
    

    in your build gradle.

    https://firebase.google.com/docs/crashlytics/upgrade-sdk?platform=android

    0 讨论(0)
  • 2020-12-30 19:08

    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.

    0 讨论(0)
提交回复
热议问题