根据
react-native docs
ndroid 8.0 (Oreo)
还有其他的说明。唯一的区别是我已经定义了varibles的路径
.bashrc
而不是
.bash-profile
. 当我想运行我的react本机应用程序时,我要面对
Build failed with an exception.
日志如下所示:
sudo react-native run-android
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
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.
为我构建的项目不包含
local.properties
. 但我已经在路上找到了你的家。
$ printenv | grep Android
ANDROID_HOME=/home/amir/Android/Sdk
PATH=/home/amir/Android/Sdk/tools:/home/amir/Android/Sdk/tools/bin:/home/amir/Android/Sdk/platform-tools:/home/amir/Android/Sdk/emulator