API 'variant.getExternalNativeBuildTasks()' is obsolete and has been replaced with 'variant.getExternalNativeBuildProviders()

前端 未结 21 1471
离开以前
离开以前 2020-12-02 04:19

Using Android Studio 3.3 Canary 11 with the gradle plugin version 3.3.0-alpha11. It throws the following error when trying to sync gradle

WARNI         


        
相关标签:
21条回答
  • 2020-12-02 04:34

    For me, I followed these steps: 1. upgrade the Gradle dependency on project level build.gradle.

            classpath 'io.fabric.tools:gradle:1.28.0'
    
    1. add this plugin dependency below apply plugin: 'com.android.application' in the app level build.gradle.

          apply plugin: 'io.fabric'
      
    2. Sync the project with gradle files.

    0 讨论(0)
  • 2020-12-02 04:34

    This happens due to the update of your Android Studio from Android Studio 3.2.0 to Android Studio 3.3.0. Update Your Gradle Dependencies (Project)of IO.Fabric. Like:

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

    and also update your Kotlin version to

    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.20"
    

    This will resolve this issues. Thanks

    0 讨论(0)
  • 2020-12-02 04:35

    Latest news from 01/24/2019

    Info here https://issuetracker.google.com/issues/116408637

    We will need to wait untill Crashlytics came up with a solution, here is GitHub issue opened

    https://github.com/firebase/firebase-android-sdk/issues/198

    The only way I'm using as right now to not comment io.fabric plugin is downgrading my gradle and upgrading my fabric classpath (this is working on my production app)

     dependencies {
            classpath 'com.android.tools.build:gradle:3.2.1'
            classpath 'com.google.gms:google-services:4.2.0'
            classpath 'io.fabric.tools:gradle:1.27.0'
    
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    
    0 讨论(0)
  • 2020-12-02 04:38

    It was a problem with latest gradle (in my case 3.3.2) version and Fabric.io plugin. It is now solved by the new version Users should have this in their top-level build.gradle:

    buildscript {
       // ... repositories, etc. ...
    
        dependencies {
            // ...other dependencies ...
            classpath 'io.fabric.tools:gradle:1.28.0'
        }
    }
    
    0 讨论(0)
  • 2020-12-02 04:44

    Build log prints how to debug this, particularly you need to run build with -Pandroid.debug.obsoleteApi=true, that'll print stack-trace of call to deprecated API and you'll be able to figure which plugin/code calls it.

    If it ends up being your code — use new Provider API (read Lazy Task Configuration doc)

    If it comes from other plugin — report to them with stack-trace and warning message and maybe submit a patch. As in this case its related to io.fabric issue.

    0 讨论(0)
  • 2020-12-02 04:46

    The issue has been fixed in their latest release 'io.fabric.tools:gradle:1.30.0'

    Please update your both gradle fabric tools with 1.30.0

    buildscript {
      // ... repositories, etc. ...
    
       dependencies {
           // ...other dependencies ...
           classpath 'io.fabric.tools:gradle:1.30.0'
       }
    }
    

    For more details https://github.com/firebase/firebase-android-sdk/issues/198#issuecomment-473435453

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