Just confirmed my assumptions - this is due to a new change in the latest version of the Android SDK.
Sincerely, we have a time machine, so that we can return to what exactly happened (cannot find any remark from the SDK Tools Release Note ).
Let's look at the ANDROID_HOME file structures before and after the change.
Before
android-sdk-linux ├── SDK Readme.txt ├── add-ons (empty) ├── platforms (empty) └── tools ├── a bunch of preloaded tools ├── ... └── ...
After :
tools ├── a bunch of preloaded tools ├── ... └── ...
More add-ons or platforms , but only tools as the new root directory.
Problem : Gradle will be confusing if you install $ANDROID_HOME directly in the unpacked topmost tools directory.
Solution . After unpacking the new SDK file (you will get the tools directory), create another directory (for example, android-sdk ) and completely move the tools directory inside empty android-sdk , then set the environment variables as:
ANDROID_HOME=/android-sdk PATH=${PATH}:${ANDROID_HOME}/tools
In short: DO NOT FIND install $ANDROID_HOME directly in the parent directory of tools , wrap it inside another parent!
source share