Android Studio构建失败,但在控制台中成功

时间:2017-06-18 14:25:16

标签: android macos android-studio android-ndk

我正在尝试构建这个项目:

https://github.com/walleth/walleth

当我在我的控制台中构建它时,它会成功,就像这样:

enter image description here

但出于某些原因,当我尝试在Android Studio中构建它时,它失败并出现以下错误:

enter image description here

也许是因为在我的~/.zshrc中我设置了以下变量:

Update your environment variables:

export ANT_HOME=/usr/local/opt/ant
export MAVEN_HOME=/usr/local/opt/maven
export GRADLE_HOME=/usr/local/opt/gradle
export ANDROID_HOME=/usr/local/opt/android-sdk
export ANDROID_NDK_HOME=/usr/local/opt/android-ndk

Update your paths (bonus points to a better solution to the hardcoded build tools version):

export PATH=$ANT_HOME/bin:$PATH
export PATH=$MAVEN_HOME/bin:$PATH
export PATH=$GRADLE_HOME/bin:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/build-tools/19.1.0:$PATH

根据this tutorial,这可能吗?

为什么它会在我的控制台上构建,而不是在Android Studio中构建?

0 个答案:

没有答案