我在Ubuntu服务器上有一个React Native项目,想要构建一个生产环境下的Android应用。为了达到这个目的,我需要首先生成Gradle包装文件,因此我在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服务器上安装它?