2016-08-18 1 views
0

Große Probleme beim Versuch, mit Ionic android zu bauen. Ich versuchte zunächst die normalen ionic build android, es mitIonic: Fehler beim Erstellen von Android

gescheitert
[Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.] 

ich um Stack-Überlauf einig Jagd gemacht und ionische Foren und installierte Java und Android Studio als ‚Lösung‘, begann es viele .jar-Dateien zu installieren, und das ist passiert:

Download https://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar 


    Download https://repo1.maven.org/maven2/commons-codec/commons-codec/1.4/commons-codec-1.4.jar 


    Download https://repo1.maven.org/maven2/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.jar 


    Download https://repo1.maven.org/maven2/org/abego/treelayout/org.abego.treelayout.core/1.0.1/org.abego.treelayout.core-1.0.1.jar 




    FAILURE: Build failed with an exception. 

    * What went wrong: 
    A problem occurred configuring root project 'android'. 
    > failed to find target with hash string 'android-23' in: /Users/.../Library/Android/sdk 

    * Try: 
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 


    BUILD FAILED 

    Total time: 51.558 secs 

    Error: /users/nick/documents/.../.../platforms/android/gradlew: Command failed with exit code 1 Error output: 
    FAILURE: Build failed with an exception. 

    * What went wrong: 
    A problem occurred configuring root project 'android'. 
    > failed to find target with hash string 'android-23' in: /Users/.../Library/Android/sdk 

    * Try: 
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 
    Please install Android target: "android-23". 

    Hint: Open the SDK manager by running: /Users/.../Library/Android/sdk/tools/android 
    You will require: 
    1. "SDK Platform" for android-23 
    2. "Android SDK Platform-tools (latest) 
    3. "Android SDK Build-tools" (latest) 

Irgendwelche Beratung? Vielleicht muss ich Android Studio oder etwas anderes deinstallieren? Ich bin sehr schlecht darin, wie Sie wahrscheinlich sagen können. Aber das hält das Projekt, an dem ich gerade arbeite, enorm zurück, also wird es unglaublich sein, wenn jemand helfen könnte!

+0

mit Windows oder Mac oder Linux? –

+0

@ ahlem-jarrar Mac, sorry – o1n3n21

Antwort

0

Basis von Installing the Android Development Environment

konfigurieren ANDROID_HOME Umgebungsvariablen basierend auf der Position des Android SDK. Ziehen Sie außerdem in Betracht, ANDROID_HOME/tools und ANDROID_HOME/platform-tools zu Ihrem PATH hinzuzufügen.

Für Mac:

export ANDROID_HOME=/<installation location>/android-sdk-macosx 
    export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools 

Für Fenster:

set ANDROID_HOME=C:\<installation location>\android-sdk-windows 
set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools 

für Linux:

export ANDROID_HOME=/<installation location>/android-sdk-linux 
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools 
+0

Okay, ich denke, ich habe diese bereits gesetzt: ANDROID_HOME =/Benutzer/Nick/Bibliothek/Android/sdk JAVA_HOME =/Bibliothek/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Inhalt/Home – o1n3n21

+0

Immer noch der Fehler: rror: /users/nick/documents/.../applications/platforms/android/gradlew: Befehl fehlgeschlagen mit Exit Code 1 Fehler Ausgabe: FAILURE: Build fehlgeschlagen mit einer Ausnahme. * Was schief gelaufen ist: Beim Konfigurieren des Root-Projekts 'android' ist ein Problem aufgetreten. > nicht gefunden Ziel mit Hash-Zeichenfolge 'android-23' in:/Users/Nick/Library/Android/sdk – o1n3n21

+0

klicken Sie auf den Link in den Fehler geschrieben: Öffnen Sie Android SDK Manager und es wird Dialog angezeigt, der Ihnen helfen wird um den SDK für Ihr Projekt zu installieren. –

Verwandte Themen