Error while running mobile react-native app

0

Running react-native run-android gives the following error:

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ': app: mergeDebugResources'.

      

    Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2 mins 21.254 secs Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: link

JDK information:

  

java version "1.8.0_181" Java (TM) SE Runtime Environment   (build 1.8.0_181-b13) Java HotSpot (TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

React-native information:

  

react-native-cli: 2.0.1   react-native: 0.55.4

I've tried to run Genymotion on my own phone and Android Studio, but it's the same error.

API 23 and 28.

    
asked by anonymous 04.08.2018 / 04:50

1 answer

0

Caius, a question, do you have the environment variable ANDROID_HOME set? If you do not know, run the command: echo $ANDROID_HOME for mac or linux . If you have not set the variable, set it by pointing to where your Android SDK is.

If the variable is defined, do the following:
Open Genymotion > Settings > ADB > Check the Use custom Android SDK tools > Select the folder that is set to your ANDROID_HOME.

    
06.08.2018 / 04:35