6

I have updated my android studio. After that my Crashlytics create the problem. is it problem with crashlytics? or How can I solve this?

This is error

API 'variant.getExternalNativeBuildTasks()' is obsolete and has been 
replaced with 'variant.getExternalNativeBuildProviders()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration- 
avoidance.
To determine what is calling variant.getExternalNativeBuildTasks(), use - 
Pandroid.debug.obsoleteApi=true on the command line to display a stack 
trace.
Affected Modules: app
4
  • I guess it's related to their plugins, and we can not really do anything Jan 19, 2019 at 5:15
  • Possible duplicate of variantOutput.getPackageApplication() is obsolete Jan 31, 2019 at 13:48
  • @MartinZeitler How can it is duplicate. Please Read the question carefully. I already mention Crashlytics. Your issue may be migration. Feb 3, 2019 at 3:47
  • @Masum down-voted your question, too... because I'm not the one who did not read "carefully". and my issue isn't migration, but people who post duplicates, without having researched "carefully". Feb 3, 2019 at 4:37

4 Answers 4

17

This has been fixed in the latest release of the Fabric gradle plugin, 1.28.0. Have this in your top-level build.gradle:

buildscript {
  // ... repositories, etc. ...

   dependencies {
       // ...other dependencies ...
       classpath 'io.fabric.tools:gradle:1.28.0'
   }
}
1
  • I am using classpath 'io.fabric.tools:gradle:1.28.1. Still getting same warning. Mar 26, 2019 at 6:21
6

You can add

android.debug.obsoleteApi=true

to the gradle.properties file and it will show you stack trace, so you can determine what module is using obsolete APIs

However, this is considered as a warning at the moment, not an error. It's just annoying to see everytime you sync gradle . In the future modules will be updated & this warning will be gone

Hope this helps :)

2
  • 1
    What about when I am releasing apk file. Jan 19, 2019 at 9:51
  • 1
    Works for me. This is not an error, just a warning.
    – Deishelon
    Jan 19, 2019 at 9:57
2

Probably now is late, but it helped me:

  apply plugin: 'com.android.application'
  apply plugin: 'io.fabric'
  apply plugin: 'kotlin-android'
  apply plugin: 'kotlin-android-extensions'

The problem was with apply plugin: 'io.fabric' I just had to comment this line and after it worked

apply plugin: 'com.android.application'
//apply plugin: 'io.fabric'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

It happens after I updated Android Studio to 3.3.0.

Or you can downgrade to Android Studio 3.2.1.

1
  • This is bad advice imo. Doing so removes Crashlytics.
    – eipipuz
    Apr 11, 2019 at 18:55
2

It's caused by Fabric's plugin needed for Crashlytics.

Commenting out apply plugin: 'io.fabric' resolves the issue. So the only option is to wait until Google devs will fix Fabric's plugin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.