0

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?

cans
  • 67
  • 7
  • This should help [https://stackoverflow.com/questions/48071618/execution-failed-for-task-appcompiledebugjavawithjavac-android-studio-3-1-up/52056367](https://stackoverflow.com/questions/48071618/execution-failed-for-task-appcompiledebugjavawithjavac-android-studio-3-1-up/52056367) – Hammad Hassan Mar 18 '21 at 10:59
  • or this [https://stackoverflow.com/questions/33404552/execution-failed-for-task-appcompiledebugjavawithjavac-in-android-studio/49967761] (https://stackoverflow.com/questions/33404552/execution-failed-for-task-appcompiledebugjavawithjavac-in-android-studio/49967761) – Hammad Hassan Mar 18 '21 at 11:01

0 Answers0