0
我想通過以下命令離子打造我的Android項目:環境變量爲Android Studio不工作
ionic cordova build android
我閱讀了大量的線程對ANDROID_HOME環境變量設置爲MAC OS 。我已經編輯了的.bash_profile和現在它看起來是這樣的:
export ANDROID_HOME=Users/christiangehn/Library/Android/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
但我仍然得到以下錯誤信息:
[ERROR] An error occurred while running cordova build android (exit code 1):
Error: Failed to find 'ANDROID_HOME' environment variable. Try setting
setting it manually.
Detected 'adb' command at /usr/local/Cellar/android-platform-tools/24/bin
but no 'platform-tools' directory found near.
Try reinstall Android SDK or update your PATH to include valid path to
SDK/platform-tools directory.
我已經在終端檢查環境變量的printenv。
ANDROID_HOME=Users/christiangehn/Library/Android/sdk
PATH=Users/christiangehn/Library/Android/sdk/
tools:Users/christiangehn/Library/Android/sdk/
platform-tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
請問你們看看我做了什麼,告訴我什麼是錯的?