2017-08-20 2 views
0

Ich verwende Ionic2 und ich möchte android in Mac auszuführen: wenn ich Befehl verwendet:wie Android-Pfad in mac hinzuzufügen

ionic cordova run android 

ich diesen Fehler hatte:

ERROR running one or more of the platforms: Android SDK not found. Make 
sure that it is installed. If it is not at the default location, set 
the ANDROID_HOME environment variable. 
You may not have the required environment or OS to run this project 

obwohl ich hat SDK in diesem Ordner installiert:

/Users/macbookpro/Library/Android/sdk 

und wenn ich diesen Befehl im Terminal schreiben:

export ANDROID_HOME=/Users/macbookpro/Library/Android/sdk 

und dann schreiben:

sudo nano /etc/paths 

ich diese pathes hatte nur:

/usr/local/bin 
/usr/bin 
/bin 
/usr/sbin 
/sbin 

was soll ich tun Pfad richtig zu addieren!

Antwort

0

Ich hatte ein ähnliches Problem, und ich hinzugefügt, um eine Datei android-sdk

sudo vi /etc/paths.d/android-sdk 

Fügen Sie Ihre Pfade in der das Verzeichnis /etc/paths.d

sudo mkdir /etc/paths.d 

und erstellt Datei und speichern