Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio3.3 variantOutput.getProcessResources() is obsolete and has been replaced with 'variantOutput.getProcessResourcesProvider()

Tags:

android

gradle

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
like image 807
jo jo Avatar asked Jan 15 '19 12:01

jo jo


2 Answers

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!

like image 77
Homan Huang Avatar answered Oct 05 '22 17:10

Homan Huang


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

like image 37
kimchibooty Avatar answered Oct 05 '22 17:10

kimchibooty