Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Unable to resolve this warning. How can I resolve this?

 variant.getExternalNativeBuildTasks()' is obsolete and has been replaced with 
 variant.getExternalNativeBuildProviders()
like image 845
Hemendra Gangwar Avatar asked Dec 24 '18 04:12

Hemendra Gangwar


3 Answers

Just update Fabric gradle plugin to 1.28.0

dependencies {
   classpath 'io.fabric.tools:gradle:1.28.0'
}
like image 61
Vladyslav Panchenko Avatar answered Oct 14 '22 20:10

Vladyslav Panchenko


Add this android.debug.obsoleteApi=true to the gradle.properties file. And make gradle clean, sync and then build an APK. Worked for me. I have Android Studio 3.3 and Gradle version 4.10.1.

For more information check this link out: Android Gradle plugin release notes.

I agree with other contributors: Fabric causes this error.

UPDATE

Check Valdislav Panchenko's answer:

Now you can just update your Fabric plugin to 1.28.0 as follows:

dependencies {
   classpath 'io.fabric.tools:gradle:1.28.0'
}
like image 28
Vitaly Zeyenko Avatar answered Oct 14 '22 20:10

Vitaly Zeyenko


Most likely 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.

like image 7
Minas Avatar answered Oct 14 '22 20:10

Minas