brew cask install android-sdk - android

I’m having problem to install android sdk (brew cask install android-idk) on Mac OS X.
I tried to install it for nativescript. I read on people that had the same problem but i couldn't find working solution.
I tried to change the java path maybe it cause the issue.
this is the error I get:
==> 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

This is what docs say and you can give it a try -
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.
Run the following commands in the Terminal:
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
OR
Solution 2
Download Android Studio and update for API levels and support repos that's it - Works all the time for me
Android SDK

Related

Cannot find adb under platform-tools

I have installed android-sdk through command line
command - brew install --cask android-sdk
and have also installed the platform tools. I have this folder structure
/usr/local/share/android-sdk
under this, i have the following:
emulator
licenses
patcher
platform-tools
platforms
system-images
tools
there is no adb inside platform tools, in fact it is empty. I do have adb installed which is under: /usr/local/bin/adb
Now , when I build - I keep getting the error :
An unknown server-side error occurred while processing the command. Original error:
Could not find 'adb' in ["/usr/local/share/android-sdk/platform-tools/adb","/usr/local/share/android-sdk/emulator/adb",
"/usr/local/share/android-sdk/cmdline-tools/latest/bin/adb","/usr/local/share/android-sdk/tools/adb",
"/usr/local/share/android-sdk/tools/bin/adb",
"/usr/local/share/android-sdk/adb"]. Do you have Android Build Tools installed at '/usr/local/share/android-sdk'?
Can anyone help me to solve this?
Use brew install --cask android-platform-tools

Unable to install Android build-tools with sdkmanager

I'm trying to build android applications with the command line tools in Windows 10.
I was able to install the platform tools and the platform with the sdkmanager with no problem and also accepted all of the licenses.
But when I try to install the build tools using this command
./sdkmanager --sdk_root=C:/Android --verbose "build-tools;27.0.3" it fails and
I get these messages running on verbose:
Info: Parsing C:\Android\cmdline-tools\4.0\package.xml
Info: Parsing C:\Android\platform-tools\package.xml
Info: File C:\Users\PC\.android\repositories.cfg could not be loaded.
Warning: Dependant package with key emulator not found!
Warning: Unable to compute a complete list of dependencies.
I found this question which had the same warning: Error "Dependent package with key emulator not found" while updating Android SDK and tools
But it seems that the emulator package doesn't exist anymore and I don't think it has to do with why I am unable to install the build-tools
Any help will be appreciated.
Open the bin folder
On the location bar at the top, remove everything for it and type cmd
Now type this command:-
sdkmanager.bat "build-tools;latest" --sdk_root=../
After this command, type this command:-
sdkmanager.bat "platforms;android-32" --sdk_root=../
NOTE - Upper command android-32.0.0 is based on the time I am typing this
And this will work in most the cases, or try reinstalling or consider watching the video tutorials on YouTube

Mac OSX Android Studo: Install the Android build tools version 19.1.0 or higher

I've been doing some research on this issue, which has been asked on StackOverflow many times, yet all previous answers tend to dismiss the question with something like "Set the environment variables."
I just downloaded Android Studio to my Mac. I'm trying to get it to import a Cordova/Ionic app, but I get this error:
No installed build tools found. Install the Android build tools version 19.1.0 or higher.
I figured I would follow the advice here:
https://gist.github.com/patrickhammond/4ddbe49a67e5eb1b9c03
and run:
brew install ant
brew install maven
brew install gradle
brew install android-sdk
brew install android-ndk
but some of these packages have been moved, so I had to follow the advice here:
https://github.com/Homebrew/homebrew-core/issues/11656
brew tap caskroom/cask
and then:
brew cask install android-sdk
brew cask install android-ndk
brew cask install android-platform-tools
This command:
brew cask install android-ndk
offered this tip:
==> Caveats
You may want to add to your profile:
'export ANDROID_NDK_HOME="/usr/local/share/android-ndk"'
If I do this:
ls -al /usr/local/share/android-ndk
I see:
lrwxr-xr-x /usr/local/share/android-ndk -> /usr/local/Caskroom/android-ndk/16b/android-ndk-r16b
I check both paths to be sure both are owned by me, as user.
I open
~/.bash_profile
and put this in place:
export ANDROID_HOME="/usr/local/share/android-sdk"
export ANDROID_NDK_HOME="/usr/local/share/android-ndk"
export PATH=$PATH:ANDROID_NDK_HOME:$ANDROID_HOME:$ANDROID_HOME/tools/:$ANDROID_HOME/platform-tools/
And then:
source ~/.bash_profile
I open Android Studio again, and again I get the same error:
No installed build tools found. Install the Android build tools version 19.1.0 or higher.
I open Preferences in Android Studio and, under Path Variables I add:
ANDROID_HOME
/usr/local/share/android-sdk
I restart Android Studio.
I get the same error as before.
What might I be doing wrong?
If I do this:
sdkmanager --list
I see:
Available Updates:
ID | Installed | Available
------- | ------- | -------
tools | 26.0.1 | 26.1.1

android studio build tools install

I tried to install android studio build tools 23.0.1 to open project online but it always fails and it says Installation did not complete successfully. See the IDE log for details. Is there a way to solve? I already installed SDK 23. I am using Windows 7 64 bit.
You can try installing using sdkmanager from the terminal.
The sdkmanager tool is provided in the Android SDK Tools package (25.2.3 and higher) and is located in android_sdk/tools/bin/.
sdkmanager --list [options]
sdkmanager packages [options]
example
sdkmanager "platform-tools" "platforms;android-26"
Docs

Can i build Linphone in Android Studio on Mac?

I think we can build it. But I am getting error to build it on Android Studio. First I download the Android Studio and NDK. Then add the PATH of Android Studio and NDK to the PATH Variable. When I run
./check_tools.sh
I get the output
Could not find automake. Please install it.
Could not find autoconf. Please install it.
Could not find pkg-config. Please install it.
Could not find ant. Please install it.
Could not find yasm. Please install it.
Could not find wget. Please install it.
Could not find libtoolize. Please install libtool.
Invalid version of nasm: your version does not support elf32 output format. If you have installed nasm, please check that your PATH env variable is set correctly.
Failed to detect required tools, aborting.
But i doubt whether i need these tool on Android Studio or not. When I run the project i get the error
java.lang.UnsatisfiedLinkError: Couldn't load linphone-armeabi-v7a: findLibrary returned null.
Can anybody tell me the solution for that.
Yes you can do this
follow the step by step guide at this blog
How to build culinphone on Android Studio using Mac OS X?
http://culinphone.wordpress.com
Here is a step to step guide.
Setup Linphone Sdk on Mac OS X
How to build Linphone in Android Studio on Mac?
Step by step guide :-
Required Knowledge :-
Android Tools
Android Studio
A little bit about mac-terminal(shell)
S/W Requirements:-
Mac OS-X with these tools (You definetely need these tools to build linphone) :-
coreutils, automake, autoconf, libtool, intltool, wget, pkgconfig ,cmake,
gmake, yasm, grep, doxygen, ImageMagick, optipng, antlr3
STEP 1:-
Concerning these useful tools you can install the tools with this command
$sudo port install coreutils automake autoconf libtool intltool wget pkgconfig cmake gmake yasm grep doxygen ImageMagick optipng antlr3
STEP 2:-
Check out these Instructions how to upgrade nasm
STEP 3:-
Then install ant by typing
brew update #update if already installed
brew install ant
If you haven’t installed brew just type command give below
its a medium size download which takes 5 mins to download
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Just follow the process which involves installing various components. If you already have brew installed, make sure it’s up to date by executing:
brew update
Once installed you can simply type:
brew install ant
STEP 4:-
Now its time to install libtool. To install libtool run the command given below
curl -OL http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz
tar -xzf libtool-2.4.2.tar.gz
cd libtool-2.4.2
./configure && make && sudo make install
STEP 5:-
if you have not installed these programmes download and install
Download Android Studio & SDK
Download Android NDK
STEP 6:-
Download git repository of LInphone Android by running command
$ sudo git clone git://git.linphone.org/linphone-android.git –recursive
Now everything is configured perfectly
STEP 7:-
Open terminal and cd into linphone-android
Now when you get into the directory on terminal then check your PATH of SDK & NDK installed on your Mac run
$ echo $PATH
if you see the path with SDK and NDK location then it’s ok to proceed skip the below part and if not then you need to setup the PATH before you execute the make and make install script in
To setup path use:-
$export PATH=/Users/<yourusername>/android-sdks/platform-tools/:/Users//android-sdks/tools/:/Users//Documents/ndk/:/nobackup/local/prog/nasm/bin/:$PATH
it’s like export PATH=(Path of your SDK platform tools folder):(Path of your SDK tools folder):(Path of your NDK folder):$PATH
This will set up the path and to confirm again run
$ echo $PATH
Now if the Path is already setup you can simply run
$ make
Now connect your Device to you Mac and see if eclipse has detected it. After the device is connected run:
$ make install
Now if everythink is OK:-
After you have made your build then now you can import it into your Android Studio.
Open Android Studio
Import Project (Eclipse,ADT,Gradle,etc.) > select linphone-android > OK
I am able to build the limphone on mac by follow the steps describe here :-
Linphone for android is not working/missing libraries
You definetely need these tools to build linphone.
Concerning nasm I had the same problem. You can use this site that instructs you how to upgrade to a newer nasm:
Instructions how to upgrade nasm
Concerning other useful tools you can install the tools below with this command:
$sudo port install coreutils automake autoconf libtool intltool wget pkgconfig cmake gmake yasm grep doxygen ImageMagick optipng antlr3
All these are found in the linphone build instructions README.md file.

Categories

Resources