question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build fails with "Warning: Could not create settings", "java.lang.IllegalArgumentException"…

See original GitHub issue

Describe the bug

When trying to build the TWA, it breaks with this log:

Installing Android Build Tools. Please, read and accept the license agreement
Installing Build Tools
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(SdkManagerCliSettings.java:152)
	at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.createSettings(SdkManagerCliSettings.java:134)
	at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:57)
	at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Usage:
  sdkmanager [--uninstall] [<common args>] [--package_file=<file>] [<packages>...]
  sdkmanager --update [<common args>]
  sdkmanager --list [<common args>]
  sdkmanager --licenses [<common args>]
  sdkmanager --version

With --install (optional), installs or updates packages. By default, the listed packages are installed or (if already installed) updated to the latest version. With --uninstall, uninstall the listed packages.

<package> is a sdk-style path (e.g. "build-tools;23.0.0" or
         "platforms;android-23").
<package-file> is a text file where each line is a sdk-style path
               of a package to install or uninstall.
Multiple --package_file arguments may be specified in combination
with explicit paths.

With --update, all installed packages are updated to the latest version.

With --list, all installed and available packages are printed out.

With --licenses, show and offer the option to accept licenses for all available packages that have not already been accepted.

With --version, prints the current version of sdkmanager.

Common Arguments: –sdk_root=<sdkRootPath>: Use the specified SDK root instead of the SDK containing this tool

--channel=<channelId>: Include packages in channels up to <channelId>.
                       Common channels are:
                       0 (Stable), 1 (Beta), 2 (Dev), and 3 (Canary).

--include_obsolete: With --list, show obsolete packages in the
                    package listing. With --update, update obsolete
                    packages as well as non-obsolete.

--no_https: Force all connections to use http rather than https.

--proxy=<http | socks>: Connect via a proxy of the given type.

--proxy_host=<IP or DNS address>: IP or DNS address of the proxy to use.

--proxy_port=<port #>: Proxy port to connect to.

--verbose: Enable verbose output.
  • If the env var REPO_OS_OVERRIDE is set to “windows”, “macosx”, or “linux”, packages will be downloaded for that OS.

cli ERROR undefined

To Reproduce Steps to reproduce the behavior:

Run bubblewrap build

Expected behavior A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: macOS
  • Version 10.15.4

Additional context

First two levels of my folders, if it cacn help:

.
├── app
│   ├── build.gradle
│   └── src
├── build.gradle
├── gradle
│   └── wrapper
├── gradle.properties
├── gradlew
├── gradlew.bat
├── jdk
│   └── Contents
├── settings.gradle
├── signing-keystore.keystore
├── store_icon.png
├── tools
│   ├── NOTICE.txt
│   ├── bin
│   ├── lib
│   └── source.properties
└── twa-manifest.json

Also, signing-keystore.keystore comes from a previous build generated by pwabuilder.com

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16

github_iconTop GitHub Comments

1reaction
nhoizeycommented, Apr 28, 2020

I will set it manually when calling update then, thanks!

1reaction
nhoizeycommented, Apr 27, 2020

Oh, sorry, I thought it was already merged.

<del>I will try with the PR.</del>

Actually, I don’t know how to install this from a PR, I’ll wait for the release… 😅

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Command line tools sdkmanager always shows ...
Workaround for “Warning: Could not create settings” and “java.lang.IllegalArgumentException”; The trick for Android Studio version 3.6 or newer.
Read more >
Could not create settings (SdkManagerCliSettings.java:428 ...
Warning : Could not create settingsjava. lang. IllegalArgumentException at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.
Read more >
Android sdkmanager - Warning: Could not create settings
This tutorial provides solution to the error specific to Android sdkmanager - Warning: Could not create settings.
Read more >
[Android SDK cmdline-tools] Warning: Could not create ...
In order to resolve this issue first we need to create a folder called cmdline-tools. You can create in any destination. After creating...
Read more >
Java – SDKmanager : Warning: Could not create setting. java.lang ...
Java – SDKmanager : Warning: Could not create setting. java.lang.IllegalArgumentException. androidjavaubuntu. Im trying to install androidSDK on my Ubuntu ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found