A problem occurred configuring project ':app'
Describe the bug info Opening the app on Android... info JS server already running.
info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
FAILURE: Build failed with an exception.
- What went wrong: A problem occurred configuring project ':app'.
defaultConfig contains custom BuildConfig fields, but the feature is disabled.
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
- Get more help at https://help.gradle.org
BUILD FAILED in 6s
To Reproduce Steps to reproduce the behavior:
- npm start
- run android
- and this error showed up
Expected behavior It should be running just fine.
Screenshots https://imgur.com/a/aXJjdZO.
Desktop (please complete the following information):
- React Native 0.72.4
- JDK 17 LTS
- Gradle 8.0.1
- Pop!_OS 22.04 LTS
Smartphone (please complete the following information):
- Device: Aquos R5G
- OS: Android 12 S
Additional context Totally new project. I've added Kotlin configuration. Pls help
Might not be linked to this dependency, but to ReactNative 0.72.4 - which is using a newer version of Gradle
Adding that in your build.gradle should fix your issue
android {
buildFeatures {
buildConfig = true
}
}
https://stackoverflow.com/a/74692390/3572934
However it might fails further because the dependency needs to define a namespace. I'll push a fix for that