alpine-standalone Unknown argument --package_file=/opt/tools/package-list-minimal.txt
tomjamescn opened this issue · comments
docker run -ti runmymind/docker-android-sdk:alpine-standalone
there is an error: Unknown argument --package_file=/opt/tools/package-list-minimal.txt
after google, I found this url:
sdkmanager 26.1.1 does not support --package_file= argument
how to do then? Is there a guide or quick-start document? maybe the document in this project is too less to newbie
Thanks~
full output is:
/sbin/su-exec
1
built-in
Using Built-In SDK Flavour
Set ANDROID_HOME to /opt/android-sdk-linux
SDK Tools already bootstrapped. Skipping initial setup
Make sure repositories.cfg exists
Copying Licences
'/opt/licenses/android-sdk-preview-license' -> '/opt/android-sdk-linux/licenses/licenses/android-sdk-preview-license'
'/opt/licenses/android-sdk-license' -> '/opt/android-sdk-linux/licenses/licenses/android-sdk-license'
'/opt/licenses' -> '/opt/android-sdk-linux/licenses/licenses'
Copying Tools
'/opt/tools/android-accept-licenses.sh' -> '/opt/android-sdk-linux/bin/android-accept-licenses.sh'
'/opt/tools/android-env.sh' -> '/opt/android-sdk-linux/bin/android-env.sh'
'/opt/tools/android-sdk-update.sh' -> '/opt/android-sdk-linux/bin/android-sdk-update.sh'
'/opt/tools/android-wait-for-emulator.sh' -> '/opt/android-sdk-linux/bin/android-wait-for-emulator.sh'
'/opt/tools/entrypoint.sh' -> '/opt/android-sdk-linux/bin/entrypoint.sh'
Installing packages
spawn sdkmanager --package_file=/opt/tools/package-list-minimal.txt --verbose
Warning: Unknown argument --package_file=/opt/tools/package-list-minimal.txt
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.
Updating SDK
spawn sdkmanager --update
[=======================================] 100% Computing updates...
Accepting Licenses
spawn sdkmanager --licenses --verbose
Info: Parsing /opt/android-sdk-linux/emulator/package.xml
Info: Parsing /opt/android-sdk-linux/patcher/v4/package.xml
Info: Parsing /opt/android-sdk-linux/platform-tools/package.xml
Info: Parsing /opt/android-sdk-linux/tools/package.xml
License android-googletv-license:=======] 100% Computing updates...
---------------------------------------
Terms and Conditions
This is the Google TV Add-on for the Android Software Development Kit License Agreement.
1. Introduction
1.1 The Google TV Add-on for the Android Software Development Kit (referred to in this License Agreement as the "Google TV Add-on" and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and Google in relation to your use of the Google TV Add-on.
... more license txt...
Looks like a Bug in sdkmanager which is already filed upstream. I think, there is nothing we can do here or whats your recommendation?
Is this still an issue @tomjamescn
I ran into this today.
https://issuetracker.google.com/issues/66465833 is the problem.
This can be fixed by using one of the suggested workarounds, I am using it like this on the commandline:
while read p; do echo "y" | sh sdkmanager --verbose "${p}"; done < /opt/tools/package-list-minimal.txt
It works like this in a docker image derived from this one:
RUN while read p; do /opt/android-sdk-linux/tools/bin/sdkmanager ${SDKMNGR_OPTS} --verbose ${p}; done < /opt/tools/package-list-minimal.txt
Maybe something like this in the script:
android-accept-licenses.sh
while read p; do sdkmanager ${SDKMNGR_OPTS} --verbose ${p}; done < /opt/tools/package-list-minimal.txt
On a side note.. I am also running into this warning:
Warning: Failed to find package add-ons;addon-google_apis-google-26
Warning: Failed to find package add-ons;addon-google_apis-google-27
version 24 seems to be the latest, this is happening with the package-list-minimal.txt
only
Seriously Google?? This bug is open since almost a year. And it is marked as feature Request? This could not suck more...
Should be rater
while read p; do android-accept-licenses.sh sdkmanager ${SDKMNGR_OPTS} --verbose ${p}; done < /opt/tools/package-list-minimal.txt