We try to maintain scripts to rapidly onboard new developers and maintain consistency across teams/members. We used to install the Android SDK and NDK tools via command line as part of our scripts, download all the platforms we need and tools, and then setup android studio to use them. Since the release of Android 26 this doesn't seem possible and Android wants it to all be done via Studio. Is there any reason why the below scenario would not work?
Mac OSX
Android Studio: 2.3.3 - Installed via brew cask install android-studio
(Homebrew)
Android-SDK 26: Installed via brew cask install android-sdk
Android rc file (sourced in bash_profile)
export ANDROID_SDK_ROOT=/usr/local/share/android-sdk
export ANDROID_HOME=/usr/local/share/android-sdk/
export ANDROID_NDK_HOME=/usr/local/share/android-ndk
Steps to reproduce:
share
sdk (android sdk root path above).The Cause for this error -SDK tools package might not be installed. Quick fix: Go to the Tools –> SDK manager –> SDK tools. Deselect Hide obsolete packages option on the right bottom and further install Android SDK Tools(obsolete). A new folder named Tools is now generated in the SDK directory.
You can also choose to install Android SDK using Homebrew (the brew install android-sdk command). This installs the Android SDK in the /usr/local/Cellar/android-sdk/{YOUR_SDK_VERSION_NUMBER} path, so ANDROID_HOME should point to the installed location.
The sdkmanager tool is provided in the Android SDK Command-Line Tools package.
Try running sdkmanager "platforms;android-26"
. This is because the basic tools are not installed to be recognised as a valid SDK directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With