Skip to content

Conversation

@UNIDY2002
Copy link
Contributor

Since AGP v8, the default value of android.buildFeatures.buildConfig has been changed to false. (See: https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes#default-changes)
RN 73 has upgraded AGP to v8.
Since we are using the buildConfigField() method, upgrading RN to 73 will cause this module to throw an error during building:

A problem occurred configuring project ':react-native-webview'.
> 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`

Therefore, this PR sets the value of android.buildFeatures.buildConfig to true.

@UNIDY2002
Copy link
Contributor Author

UNIDY2002 commented Oct 11, 2023

It seems that this issue can be solved on RN's side, so let's just wait at the moment.

@UNIDY2002
Copy link
Contributor Author

Update: it is required that each library adapt to this change in AGP.

So this PR remains necessary.

@UNIDY2002
Copy link
Contributor Author

This issue is fixed on RN side by facebook/react-native@db45da7.
Closing this PR.

@UNIDY2002 UNIDY2002 closed this Oct 20, 2023
@UNIDY2002 UNIDY2002 deleted the rn-73-fix branch October 20, 2023 02:32
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