0

I just started learning react-native a couple days ago, and I got a bug during installation and setting up. The moment I run the cmd "npx react-native run-android", and I got this error.

Jetifier found 896 file(s) to forward-jetify. Using 8 workers... info JS server already running. info Installing the app...

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.

  • Get more help at https://help.gradle.org

BUILD FAILED in 3s

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.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.''

Please help me guys. Thank you very much.

1

2 Answers 2

0

Might be the issue with the incorrect SDK location. Can you verify if there is a local.properties in your android folder under your React Native project with right sdk location path in it

Also verify the below code in gradle-wrapper.properties present in gradle/wrapper folder

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3- 
all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Sign up to request clarification or add additional context in comments.

Comments

0

Add in android/local.properties this line (you can create this file if it not exist):

sdk.dir=C:\\Users\\yourusername\\AppData\\Local\\Android\\Sdk

Or in your custom android sdk path. You can find it in:

Android Studio > More Actions > Sdk Manager > Languages & Frameworks > Android SDK > Android SDK Location

Like this: enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.