0
votes

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

FAILURE: Build failed with an exception.

  • What went wrong: Task 'installDebug' not found in project ':app'.

  • Try: Run gradlew tasks to get a list of available tasks. 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 6s

at makeError (/home/te3t0/Desktop/testpro/node_modules/execa/index.js:174:9)
at Promise.all.then.arr (/home/te3t0/Desktop/testpro/node_modules/execa/index.js:278:16)
at process._tickCallback (internal/process/next_tick.js:68:7)

MY OS = Ubuntu
IDE = Android Studio

react-native info

System:

    OS: Linux 5.4 Ubuntu 20.04 LTS (Focal Fossa)
    CPU: (4) x64 Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz
    Memory: 407.84 MB / 9.60 GB
    Shell: 5.0.16 - /bin/bash

Binaries:

    Node: 10.19.0 - /usr/bin/node
    Yarn: Not Found
    npm: 6.14.4 - /usr/bin/npm
    Watchman: Not Found

SDKs:

    Android SDK: Not Found

IDEs:

    Android Studio: Not Found

Languages:

    Java: 1.8.0_252 - /usr/bin/javac
    Python: Not Found

npmPackages:

    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0 
    react-native: 0.62.2 => 0.62.2 

npmGlobalPackages:

    *react-native*: Not Found

1

1 Answers

0
votes

You need to install Android SDK and Android Studio and Configure the ANDROID_HOME environment variable. Refer: https://reactnative.dev/docs/environment-setup