8

What is bellow warning:

WARNING: API 'variantOutput.getProcessResources()' is obsolete and has been replaced with 'variantOutput.getProcessResourcesProvider()'.
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 variantOutput.getProcessResources(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
Affected Modules: app
Zoe
  • 27,060
  • 21
  • 118
  • 148
jo jo
  • 1,758
  • 3
  • 20
  • 34
  • Possible duplicate of [WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'](https://stackoverflow.com/questions/52470044/warning-api-variant-getjavacompile-is-obsolete-and-has-been-replaced-with) – Aykut Uludağ Jan 15 '19 at 16:32

3 Answers3

15

It's the bug in https://services.gradle.org/distributions/gradle-4.10.1-all.zip .

You need to roll back to https://services.gradle.org/distributions/gradle-4.6-all.zip in gradle-wrapper.properties

And

dependencies {
    classpath 'com.android.tools.build:gradle:3.2.1' //roll back to this version

I have deal with this bug for 4 hours. I gave up so I rolled back to last version. It's perfect now. So let's wait for the newer version. Don't upgrade, yet!

Homan Huang
  • 413
  • 5
  • 8
3

run a gradle task with this flag -Pandroid.debug.obsoleteApi=true and it will let you know where the obsolete feature is being used.

After identifying where the issue is, you can try updating as the message suggests

ex. .gradlew app:assembleDebug -Pandroid.debug.obsoleteApi=true

kimchibooty
  • 339
  • 1
  • 11
0

I do not need to change the default of " classpath 'com.google.gms:google-services:4.2.0' ". This is the default that I copy from firebase, it really has been updated but we do not need to update it.

jradich1234
  • 1,410
  • 5
  • 24
  • 29