Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WARNING: API 'variant.getMappingFile()' is obsolete and has been replaced with 'variant.getMappingFileProvider()'

Tags:

android

I just updated Android Studio 3.5 to Android Studio 3.6 and replaced previous Gradle plugin with Gradle plugin 3.6.0 when syncing Gradle:

build.gradle: API 'variant.getMappingFile()' is obsolete and has been replaced with 'variant.getMappingFileProvider()'

Any suggestions on how to debug this warning. Where is it coming from? I don't see any usage of getMappingFile in my code although, might be some library. Suggestions to debug these kind of cases would be helpful

like image 430
Arnab Kar Avatar asked Feb 25 '20 05:02

Arnab Kar


2 Answers

Upgrading

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

to

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

in my top-level build.gradle fixed the problem for me.

like image 185
Manu8170 Avatar answered Oct 23 '22 23:10

Manu8170


When running the gradle script with the parameter -Pandroid.debug.obsoleteApi=true set, you can get a stack trace of what is causing the issue.

I found out it in my case was related to Crashlytics. There was this issue opened, but it's apparently the legacy-plugin so the issue has been closed again with a suggestion of contacting the Fabric support. So hopefully they will find a solution.

like image 39
Anigif Avatar answered Oct 24 '22 01:10

Anigif