2017-08-22 14 views
0

Je suis en train de commencer avec NativeScript, mais lorsque je tente de courir tns run android, il me donne:Configuration de NativeScript sur Mac. « La variable d'environnement ANDROID_HOME est pas défini ou il pointe vers un répertoire inexistant

$ tns run android 
The ANDROID_HOME environment variable is not set or it points to a non-existent directory. You will not be able to perform any build-related operations for Android. 

Je déjà configuré ANDROID_HOME dans mon ~/.bash_profile

$ echo $ANDROID_HOME 
/Users/mb102/Library/Andriod/sdk 

Ce chemin correspond à ce qui est dans le gestionnaire Android studio, où je l'ai également téléchargé et installer un appareil:

$ tns devices 

Connected devices & emulators 
Searching for devices... 
┌───┬──────────────────────┬──────────┬───────────────────┬──────────┬───────────┐ 
│ # │ Device Name   │ Platform │ Device Identifier │ Type  │ Status │ 
│ 1 │ sdk_google_phone_x86 │ Android │ emulator-5554  │ Emulator │ Connected │ 
└───┴──────────────────────┴──────────┴───────────────────┴──────────┴───────────┘ 

Y at-il quelque chose de plus que je devrais faire?

Répondre

0

La faute de frappe dans votre chemin?

$ echo $ANDROID_HOME 
/Users/mb102/Library/Andriod/sdk 

devrait être:

$ echo $ANDROID_HOME 
/Users/mb102/Library/Android/sdk 

En fait, on doit bien pouvoir:

$ export ANDROID_HOME=/Users/mb102/Library/Android/sdk