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

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.


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.


  1. Go to build.gradle under Gradle Scripts
  2. Add this Line: classpath 'io.fabric.tools:gradle:1.31.2'
  3. Rebuild your Project.

Tags:

Android