且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

React Native 使 android 应用程序在 genymotion 中加载

更新时间:2023-02-06 22:22:29

你必须定义 ANDROID_HOME 我从下面的 React Native 设置指南和下面的链接中复制了相关部分.

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

在 Mac 上,将它添加到您的 ~/.bashrc、~/.bash_profile 或您的 shell 使用的任何内容:如果你通过 Homebrew 安装了 SDK,否则 ~/Library/Android/sdk

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

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

在 Linux 上,将此添加到您的 ~/.bashrc、~/.bash_profile 或您的 shell 使用的任何内容中:

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

export ANDROID_HOME=<path_where_you_unpacked_android_sdk>

在 Windows 上,转到控制面板 -> 系统和安全 -> 系统 -> 更改设置 -> 高级 -> 环境变量 -> 新建

On Windows, go to Control Panel -> System and Security -> System -> Change settings -> Advanced -> Environment variables -> New

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