Updating gradle results in 'Unable to find method 'com.android.build.gradle.tasks.GenerateBuildConfig.getBuildConfigPackageName()Ljava/lang/String'

Viewed 789

When I update classpath 'com.android.tools.build:gradle:3.6.3' to classpath 'com.android.tools.build:gradle:4.0.1'

I am getting this error. I am not sure how I can find the dependencies that may be causing this issue. For a while I have just been sticking to 3.6.3. Any ideas?

1 Answers

This is probably caused by a gradle plugin that you are using which is relying on a task that is renamed/removed/replaced in version 4.

To find out what causes it, do a gradlew -S buildDebug from the root for your project to get a verbose error stack. Also make sure to do a gradlew clean to make sure that gradle cache is not the issue.

Related