Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 460
Dreamer Avatar asked Mar 12 '19 15:03

Dreamer


4 Answers

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'
    }
}
like image 186
Sarbagya Dhaubanjar Avatar answered Oct 19 '22 02:10

Sarbagya Dhaubanjar


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

like image 20
David Santiago Turiño Avatar answered Oct 19 '22 04:10

David Santiago Turiño


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.

like image 5
Stanford Avatar answered Oct 19 '22 04:10

Stanford


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

like image 2
jsgalarraga Avatar answered Oct 19 '22 02:10

jsgalarraga