question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

See original GitHub issue

Hello, I’m new to react-native and i keep getting this error everytime i try to run: react-native run-android

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

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:installDebug'.
> java.io.IOException: The filename, directory name, or volume label syntax is incorrect

* 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.
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 14s

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

What’s wrong? is there something missing?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

2reactions
tanveerctgcommented, Feb 24, 2021

I also faced a similar problem. then I checked out the documentation again.

My problem was ANDROID_HOME environment variable was not added properly. Make sure you added ``ANDROID_HOME environment variablecorrectly

0reactions
IRAKLEcommented, Jan 21, 2021

i have the same problem, anyone fix it ?

System: OS: macOS 11.1 CPU: (4) x64 Intel® Core™ i7-6660U CPU @ 2.40GHz Memory: 32.75 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.15.4 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.11 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.3, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2 Android SDK: API Levels: 29, 30 Build Tools: 28.0.3, 29.0.2, 30.0.3 System Images: android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 4.1 AI-201.8743.12.41.7042882 Xcode: 12.3/12C33 - /usr/bin/xcodebuild Languages: Java: 15.0.2 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.3 => 0.63.3 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

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.8/userguide/command_line_interface.html#sec:command_line_warnings 124 actionable tasks: 3 executed, 121 up-to-date /Users/oleg_sim/Documents/GitHub/mobile-app-source/android/app/src/main/java/com/sapsana/app/MainApplication.java:21: error: cannot find symbol return BuildConfig.DEBUG; ^ symbol: variable BuildConfig /Users/oleg_sim/Documents/GitHub/mobile-app-source/android/app/src/main/java/com/sapsana/app/MainApplication.java:60: error: cannot find symbol if (BuildConfig.DEBUG) { ^ symbol: variable BuildConfig location: class MainApplication /Users/oleg_sim/Documents/GitHub/mobile-app-source/android/app/src/main/java/com/sapsana/app/MainApplication.java:60: error: illegal parenthesized expression if (BuildConfig.DEBUG) { ^ /Users/oleg_sim/Documents/GitHub/mobile-app-source/android/app/src/main/java/com/sapsana/app/MainActivity.java:17: error: package R does not exist img.setImageDrawable(getDrawable(R.mipmap.ic_splash)); ^ Note: /Users/oleg_sim/Documents/GitHub/mobile-app-source/android/app/src/debug/java/com/sapsana/app/ReactNativeFlipper.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 4 errors

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 52s

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 app:installDebug -PreactNativeDevServerPort=8081 /Users/oleg_sim/Documents/GitHub/mobile-app-source/android/app/src/main/java/com/sapsana/app/MainApplication.java:21: error: cannot find symbol

Please Help

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Command failed: gradlew.bat app:installDebug ...
Turns out I had a problem with my Java. I uninstall JDK and JRE and reinstall the latest version and it worked out...
Read more >
error command failed ./gradlew installdebug react native ...
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 :ReactNative:Unexpected empty result of running 'npx.cmd --quiet ...
Read more >
Task :app:installDebug FAILED | React Native Errors | Fixed!
Error : Command failed : gradlew. bat app:installDebug If you also got this error, watch the video to know the fix.
Read more >
error failed to install the app. make sure you have the android ...
Error : Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081'. i get this error when i am trying to install my app on the emulator ...
Read more >
Search - appsloveworld.com
Coding example for the question Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 (Tried all answers in other similar ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found