Please use the Discussion board if you want to get some help. Please use issues to report bugs.
Description
When upgrading to compile and target version to API 34 (with minimum gradle 8.1.1), an error occurred during the android build :
A problem occurred configuring project '
'. > defaultConfig contains custom BuildConfig fields, but the feature is disabled.
To enable the feature, add the following to your module-level build.gradle: android.buildFeatures.buildConfig true
Change your compileSdkVersion and targetSdkVersion to 34
Change your gradle version in android/build.gradle like this :
classpath("com.android.tools.build:gradle:8.1.1")
And change your android/gradle/wrapper/gradle-wrapper.properties like this : distributionUrl=https://services.gradle.org/distributions/gradle-8.1-all.zip
Description
When upgrading to compile and target version to API 34 (with minimum gradle 8.1.1), an error occurred during the android build :
Expected Behavior
Successful build like using the API 33.
Environment:
To Reproduce Steps to reproduce the behavior:
Change your compileSdkVersion and targetSdkVersion to 34
Change your gradle version in android/build.gradle like this :
classpath("com.android.tools.build:gradle:8.1.1")
And change your android/gradle/wrapper/gradle-wrapper.properties like this :
distributionUrl=https://services.gradle.org/distributions/gradle-8.1-all.zip
Then try to build and the error should occur.
The fix , add buildconfig flag for AGP8+: