【发布时间】:2019-03-23 14:34:09
【问题描述】:
我在 ubuntu 服务器中有一个 react native 项目,我想构建一个用于生产的 android 应用程序。为此,我首先必须生成 Gradle Wrapper 文件,因此我在 android 目录中运行此命令
gradle wrapper --gradle-version <my-gradle-version>
运行此命令后出现此错误
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
我知道如何在local.properties 文件中使用sdk.dir 或使用ANDROID_HOME 环境变量来定义SDK 位置。
但我的问题是 SDK 没有安装
我的问题是 react native 我需要哪个 sdk 来构建一个用于生产的 android 应用程序以及如何在 ubuntu 服务器中安装它
【问题讨论】:
-
你的电脑上安装了android studio吗?
-
不,我有 ubuntu 服务器
-
请按照说明在 Linux 中构建 React Native 项目:facebook.github.io/react-native/docs/getting-started
标签: android ubuntu react-native gradle gradlew