2017-09-03 3 views
2

J'ai un problème pour installer android sdk (brew cask install android-idk) sur Mac OS X. J'ai essayé de l'installer pour nativescript. J'ai lu sur les gens qui avaient le même problème mais je ne pouvais pas trouver de solution de travail. J'ai essayé de changer le chemin java peut-être que cela cause le problème.brasser cask installer android-sdk

c'est l'erreur que je reçois:

==> Caveats 
We will install android-sdk-tools, platform-tools, and build-tools for you. 
You can control android sdk packages via the sdkmanager command. 
You may want to add to your profile: 
    'export ANDROID_SDK_ROOT=/usr/local/share/android-sdk' 

This operation may take up to 10 minutes depending on your internet connection. 
Please, be patient. 

==> Satisfying dependencies 
==> Downloading https://dl.google.com/android/repository/sdk-tools-darwin-3859397.zip 
Already downloaded: /Users/jhon/Library/Caches/Homebrew/Cask/android-sdk--3859397,26.0.1.zip 
==> Verifying checksum for Cask android-sdk 
==> Installing Cask android-sdk 
==> Warning: Failed to download any source lists! 
==> Warning: java.nio.file.NoSuchFileException: /Users/jhon/.android/cache/sdkbin-1_b735609c-repository2-1_xml 
==> Warning: Failed to find package tools 
Error: Command failed to execute! 

==> Failed command: 
/usr/local/Caskroom/android-sdk/3859397,26.0.1/tools/bin/sdkmanager tools platform-tools build-tools;26.0.1 

==> Standard Output of failed command: 


==> Standard Error of failed command: 
jhon-MacBook-Pro-8:appNativescript jhon$ brew cask install android-idk --verbose --debug 
Error: Cask 'android-idk' is unavailable: No Cask with this name exists. 
Error: Install incomplete. 
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:13:in `run' 
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/abstract_command.rb:35:in `run' 
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:97:in `run_command' 
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:167:in `run' 
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:131:in `run' 
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:8:in `cask' 
jhon-MacBook-Pro-8:appNativescript jhon$ brew cask install android-sdk 
==> Caveats 
We will install android-sdk-tools, platform-tools, and build-tools for you. 
You can control android sdk packages via the sdkmanager command. 
You may want to add to your profile: 
    'export ANDROID_SDK_ROOT=/usr/local/share/android-sdk' 

This operation may take up to 10 minutes depending on your internet connection. 
Please, be patient. 

==> Satisfying dependencies 
==> Downloading https://dl.google.com/android/repository/sdk-tools-darwin-3859397.zip 
Already downloaded: /Users/jhon/Library/Caches/Homebrew/Cask/android-sdk--3859397,26.0.1.zip 
==> Verifying checksum for Cask android-sdk 
==> Installing Cask android-sdk 
==> Warning: Failed to download any source lists! 
==> Warning: java.nio.file.NoSuchFileException: /Users/jhon/.android/cache/sdkbin-1_b735609c-repository2-1_xml 
==> Warning: Failed to find package tools 
Error: Command failed to execute! 

==> Failed command: 
/usr/local/Caskroom/android-sdk/3859397,26.0.1/tools/bin/sdkmanager tools platform-tools build-tools;26.0.1 

==> Standard Output of failed command: 


==> Standard Error of failed command: 
Warning: Failed to download any source lists! 
Warning: java.nio.file.NoSuchFileException: /Users/jhon/.android/cache/sdkbin-1_b735609c-repository2-1_xml 
Warning: Failed to find package tools 


==> Exit status of failed command: 
#<Process::Status: pid 35477 exit 1> 
Error: Install incomplete. 
jhon-MacBook-Pro-8:appNatives 

Répondre

2

C'est ce que docs disent et vous pouvez l'essayer -

Solution 1 -

Install the dependencies for Android development.

Install JDK 8 or a later stable official release. Go to Java SE Downloads and click Download for JDK. In the Java SE Development Kit section, accept the license agreement and click the download link for Mac macOS. Wait for the download to complete and install the JDK. Set the JAVA_HOME system environment variable.

export JAVA_HOME=$(/usr/libexec/java_home) Install the Android SDK.

In the terminal, run the following commands:

brew cask install android-sdk Next, run the following command to set the ANDROID_HOME system environment variable:

export ANDROID_HOME=/usr/local/share/android-sdk NOTE: This is the directory that contains the tools and platform-tools directories. In addition, install all packages for the Android SDK Platform 25, Android SDK Build-Tools 25.0.2 or later, Android Support Repository, Google Repository and any other SDKs that you may need. You can alternatively use the following command, which will install all required packages.

$ANDROID_HOME/tools/bin/sdkmanager "tools" "platform-tools" "platforms;android-25" "build-tools;25.0.2" "extras;android;m2repository" "extras;google;m2repository" Setup Android Emulators (AVD) by following the article here

OU

Solution 2

Télécharger Android Studio mise à jour pour les niveaux d'API et prises en pension de soutien qui est tout - Fonctionne tout le temps pour moi https://developer.android.com/studio/index.html

+0

Comment puis-je les outils de ligne de commande d'installation après le téléchargement Android Studio? –

+0

besoin de plus d'informations à ce sujet? Vous n'avez pas compris ce que vous dites? – Dlucidone