Finished my project in ios and now I want to add android.
I followed the instructions and downloaded the latest jdk from this site http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Then it says I must type this line in the command line brew install android-sdk
Command line is giving me an error
==> Downloading https://homebrew.bintray.com/bottles/android-sdk-24.4.1_1.el_cap Already downloaded: /Library/Caches/Homebrew/android-sdk-24.4.1_1.el_capitan.bottle.tar.gz ==> Pouring android-sdk-24.4.1_1.el_capitan.bottle.tar.gz Error: Permission denied - /usr/local/var Warning: Bottle installation failed: building from source. ==> Downloading https://dl.google.com/android/android-sdk_r24.4.1-macosx.zip Already downloaded: /Library/Caches/Homebrew/android-sdk-24.4.1.zip Error: Permission denied - /usr/local/var
Any ideas?
I tried to do sudo but it gave different errors
Error: Cowardly refusing to sudo brew install
You can use brew with sudo, but only if the brew executable is owned by root. However, this is both not recommended and completely unsupported so do so at your own risk. Adams-MacBook-Pro:sassi adamkatz$ brew install android-sdk ==> Downloading https://homebrew.bintray.com/bottles/android-sdk-24.4.1_1.el_cap Already downloaded: /Library/Caches/Homebrew/android-sdk-24.4.1_1.el_capitan.bottle.tar.gz ==> Pouring android-sdk-24.4.1_1.el_capitan.bottle.tar.gz Error: Permission denied - /usr/local/var Warning: Bottle installation failed: building from source. ==> Downloading https://dl.google.com/android/android-sdk_r24.4.1-macosx.zip Already downloaded: /Library/Caches/Homebrew/android-sdk-24.4.1.zip Error: Permission denied - /usr/local/var Adams-MacBook-Pro:sassi adamkatz$ sudo brew install android-sdk Password: Error: Cowardly refusing to sudo brew install
You can use brew with sudo, but only if the brew executable is owned by root. However, this is both not recommended and completely unsupported so do so at your own risk.
Any ideas thanks so much
Reinstall Homebrew using terminal:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then
brew uninstall android-idk
Then
brew install android-idk
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.