Question

[Solved] registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

I have problem when build my app on android studio (java)

> Configure project :app
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

in gradle-wrapper.properties i jave tried

distributionUrl=https://services.gradle.org/distributions/gradle-4.10.1-all.zip

distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip

distributionUrl=https://services.gradle.org/distributions/gradle-5.2.1-all.zip

still problem exist, when create new APP i dont see this problem

classes and dependencies are updated to last versions

I tried all suggestions in this link but no help

Enquirer: Dreamer

||

Solution #1:

The issue is resolved with Google Services Plugin Version 4.3.0 (Resolved with this commit)

buildscript {
    dependencies {
        // Change version to 4.3.0
        classpath 'com.google.gms:google-services:4.3.0'
    }
}
Respondent: Dreamer

Solution #2:

Looks like this is solved, once and for all, without new warnings with this:

buildscript {
    dependencies {
        classpath 'com.google.gms:google-services:4.3.2'
    }
}

More info here

Solution #3:

I was developing an app using Google Flutter and tried installing firebase. I was following Google’s tutorial and turns out my gradle version and android studio needed an update. I was also following the google guide wrong, there’s one for flutter firebase and then the other is android firebase. I went back and followed the flutter firebase guide.

So I made changes by adding the following to my project-level build.gradle

buildscript {
  dependencies {
    // Add this line
    classpath 'com.google.gms:google-services:4.3.0'
  }
}

and added this to my app-level build.gradle

// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'

Made these changes using Android Studio so I can sync all the changes throughout the app and it fixed the error.

Solution #4:

In the app level build.gradle update your androidX dependencies, for me worked changing to this versions

dependencies {
    ...
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

My minSdkVersion is 19 so don’t know if needed to update to 23 as suggested in by some people

Respondent: Stanford

Solution #5:

classpath ‘com.google.gms:google-services:4.3.3’ solves this issue.

And also it solves the issue:
WARNING: API ‘variant.getMergeResources()’ is obsolete and has been replaced with ‘variant.getMergeResourcesProvider()’.

The above issue is generated when you use
classpath ‘com.google.gms:google-services:4.3.0’
So avoid using it.

Respondent: jsgalarraga

Solution #6:

Last version: (on feb 2021)

classpath 'com.google.gms:google-services:4.3.5'
Respondent: Hassan

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy