Android Command line tools sdkmanager always shows: Warning: Could not create settings
Instead of passing the argument --sdk_root for each single command execution, let's deep dive into the real cause.
Instead of passing the argument --sdkroot for each single command execution, let's deep dive into the real cause. Starting from Android SDK Command-line Tools 1.0.0 (6200805) , in contrast to Android SDK 26.1.1 (4333796) , the tools directory hierarchy has been changed. Previously it was placed right inside ANDROIDHOME (which is deprecated, we will use the term ANDROIDSDKROOT for the rest of the paragraph), now it's still named as tools (the only thing you'll get after unpacking the downloaded commandlinetools zip file), but differently, you have to place it inside a directory called cmdline-tools on your own. The name cmdline-tools comes from its package name, where you can get from listing packages command sdkmanager --list , whose outputs include cmdline-tools;1.0 | 1.0 | Android SDK Command-line Tools . Wrapping tools directory inside cmdline-tools directory would make it work, and help you get rid of the annoying --sdkroot argument. But what about the other parts? Well, that's all you have to change. Let me explain more. The king - sdkmanager lives inside cmdline-tools/tools/bin , you'd better set in PATH environment variable cmdline-tools should not be set as ANDROIDSDKROOT . Because later, when updating Android SDK, or installing more packages, the other packages will be placed under ANDROIDSDKROOT , but not under cmdline-tools . The final, complete ANDROIDSDK_ROOT directory structure should look like below, consist of quite a few sub-directories: build-tools
Context: I use the new command line tools for Android because the old sdk-tools repository of Android isn't available anymore. So I changed my gitlab-ci to load the commandlintools . But when I try to run it I get the following error: Warning: Could not create settings java.lang.IllegalArgumentException at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.[init](SdkManagerCliSettings.java:428) at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.createSettings(SdkManager
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.