Error running React-Native run-android

Asked

Viewed 58 times

1

Good day to you all. I’m taking a course in React-Native and I’m already in 10th class. I’m running the course project via USB Debugging on mobile. Until then, everything worked fine but when I updated the SRC folder of the 11th class, the React-Native run-android started to show some errors and no longer ran on mobile. So, I came back with the files of the 10th class (that worked well) but now appear the errors I show below, and no longer runs. As a beginner, I have no idea what could be causing this. Could you help me ? Thanks in advance.

Follow the error lines:

C:\Temp\____Cursos\Samurai\Aula Smart Money\smartMoney2>npx react-native run-android

info Running jetifier to migrate Libraries to Androidx. You can disable it using "-no-jetifier" flag. Jetifier found 1192 file(s) to forward-jetify. Using 8 Workers... info Starting JS server... info Installing the app...

Task :app:compileDebugJavaWithJavac FAILED

Deprecated Gradle Features Were used in this build, making it incompatible with Gradle 7.0. Use '-Warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings 133 actionable tasks: 4 executed, 129 up-to-date C: Temp____courses Samurai Aula Smart Money smartMoney2 android app src main java com smartmoney Mainapplication.java:22: error: cannot find Symbol Return Buildconfig.DEBUG; ^ Symbol: variable Buildconfig Note: C: Samurai Courses Aula Smart Money smartMoney2 android app src debug java com smartmoney2 Reactnativeflipper.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for Details. 1 error

FAILURE: Build failed with an Exception.

  • What Went Wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.

Compilation failed; see the Compiler error output for Details.

  • 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 9s

error Failed to install the app. Make sure you have the Android Development Environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more Details. Error: Command failed: gradlew.bat app:installDebug -Preactnativedevserverport=8081 C: Temp____courses Samurai Aula Smart Money smartMoney2 android app src main java com smartmoney Mainapplication.java:22: error: cannot find Symbol

C: Temp____samurai Classes Smart Money smartMoney2>

  • Did you install any new dependencies before starting to occur? If so, which one?

  • Good morning. I didn’t install anything, because the class didn’t mention anything about some new dependency.

  • Executes a cd android, ./gradlew clean, cd .. and tries to run the project again. Sometimes this solves.

  • Thanks for your help, but it didn’t help. I think I’ll create another ZERO project, put the 10th class that was working and install each dependency gradually.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.