I'm creating a React native project. But when I enter the npx react-native run-android
command, I get the following error.
> Task :app:compileDebugJavaWithJavac FAILED
18 actionable tasks: 18 executed
/Users/Cans/Desktop/react-egitimi/introduction/loginPageProject/android/app/src/main/java/com/loginapp/MainApplication.java:19: error: cannot find symbol
return BuildConfig.DEBUG;
^
symbol: variable BuildConfig
Note: /Users/Cans/Desktop/react-egitimi/introduction/loginPageProject/android/app/src/debug/java/com/loginpageproject/ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
FAILURE: Build failed with an exception.
* Get more help at https://help.gradle.org
BUİLD FAILED in 18s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
/Users/Cans/Desktop/react-egitimi/introduction/loginPageProject/android/app/src/main/java/com/loginapp/MainApplication.java:19: error: cannot find symbol
return BuildConfig.DEBUG;
^
symbol: variable BuildConfig
Note: /Users/Cans/Desktop/react-egitimi/introduction/loginPageProject/android/app/src/debug/java/com/loginpageproject/ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
FAILURE: Build failed with an exception.
I tried deleting gradle but it gives the same result again. what is the solution?