React Native make Android app download in genymotion

I am trying to create an android app as an answer. I followed the official recommendations and downloaded genymotion and created a new project in response to my own. How to open my project in genymotion?

I get the following error in terminal

FAILURE: build failed with exception.

  • Where: Build the file '/Users/adamkatz/Projects/testAndroid/android/app/build.gradle': 69

  • What went wrong: There was a problem evaluating the project: app.

    SDK location not found. Locate using sdk.dir in the local.properties file or with the ANDROID_HOME environment variable.

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

STRICTLY MALFUNCTIONAL

Total time: 6.504 sec. Failed to install the application on the device, read the error above. Make sure your Android emulator is running or the device is connected. set up your Android development environment: https://facebook.imtqy.com/react-native/docs/android-setup.html

when I added the following export ANDROID_HOME = / usr / local / opt / android-sdk

I get the following error message

FAILURE: build failed with exception.

  • What went wrong: There was a problem setting up the project: app.

    could not find build tools version 23.0.1

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

STRICTLY MALFUNCTIONAL

Total time: 3,735 seconds Failed to install the application on the device, read the error above. Make sure your Android emulator is running or the device is connected. set up your Android development environment: https://facebook.imtqy.com/react-native/docs/android-setup.html

+6
source share
3 answers

You must define ANDROID_HOME I copied the relevant parts from the React Native configuration guide below and the link below that.

On a Mac, add this to your ~ / .bashrc, ~ / .bash_profile file or whatever your shell uses: If you installed the SDK via Homebrew, otherwise ~ / Library / Android / sdk

export ANDROID_HOME=/usr/local/opt/android-sdk 

On Linux, add this to your ~ / .bashrc, ~ / .bash_profile file, or whatever your shell uses:

 export ANDROID_HOME=<path_where_you_unpacked_android_sdk> 

In Windows, go to Control Panel → System and Security → System → Change Settings → Advanced → Variable Environment → New

https://facebook.imtqy.com/react-native/docs/android-setup.html#define-the-android-home-environment-variable

+3
source

Add a properties file called local.properties to the Android project directory (for example, open a project called xyz and add this file) and add:

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

in the file and save it.

Run the project.

+1
source

It seems you do not have a build tool for version 23.0.1 installed on your computer. Run the sdk manager and install the specified version.

More details. Complete the React native setup for use with the Genny movement here Android Setup - React Native

-1
source

All Articles