3

After I added this piece of code into settings.gradle.kts the BuildConfig file is not being generated.

pluginManagement {
    repositories {
       google()
       gradlePluginPortal()
       mavenCentral()
    }
}

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
    }
}

rootProject.name = "Banking"
include(":app")

How can I make it be generated again? But I need to keep the code inside settings.gradle.kts.

Edit: I have already tried Invalidating caches and reloading the project.

Tbijo54
  • 65
  • 6

2 Answers2

4

When I faced this problem, adding the following code to the build.gradle of the app level helped me:

android {
    buildFeatures {
        buildConfig = true
    }
}

Or you can add the following the line in the gradle.properties file at the root project of your build:

android.defaults.buildfeatures.buildconfig=true
Victor Sklyarov
  • 827
  • 2
  • 3
  • 24
0

Fixed it by migrating Gradle from 7.2.2 to 7.3.0. Thank you to everyone who tried to help.

Tbijo54
  • 65
  • 6