Skip to content

fix(android): fix build on AGP 9 / RN 0.87 - #678

Open
wperkins-micron wants to merge 1 commit into
react-native-picker:masterfrom
wperkins-micron:patch-1
Open

wperkins-micron wants to merge 1 commit into
react-native-picker:masterfrom
wperkins-micron:patch-1

Conversation

@wperkins-micron

Copy link
Copy Markdown

I am currently updating an Android app from React Native 0.77.3 to 0.87.1. I followed the upgrade helper, which also bumps the Gradle version from 8.10.x to 9.4.1. Attempting to build and run the app under AGP 9 causes the build to fail with the following error:

error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong:
A problem occurred configuring project ':react-native-picker_picker'.
> 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`

This is fixed by adding the following block of code inside the android block in android/build.gradle:

buildFeatures {
        buildConfig = true
}

See also a similar issue and open pull request for another RN community module:

No AI was used in the creation of this patch or pull request in any way.

@wperkins-micron
wperkins-micron marked this pull request as ready for review September 30, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant