Skip to content

Conversation

@jonathanpeppers
Copy link
Member

@jonathanpeppers jonathanpeppers commented Oct 31, 2017

On Windows, the lint tool installed by the build was broken.
This causes several tests to fail on Windows verifying features
around lint After looking into it, it appears the URLs used to
download the SDK tools were not found in:

https://dl.google.com/android/repository/repository-12.xml

The correct URLs appear to be of the form tools_rx.x.x-platform.zip.
Note Google uses macosx in this file name instead of darwin.
Not sure what version of the SDK tools were being used previously,
they must be a prerelease or nightly release.

Other changes:

  • The command sdkmanager --license is now sdkmanager --update

@dnfclas
Copy link

dnfclas commented Oct 31, 2017

@jonathanpeppers,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@jonathanpeppers
Copy link
Member Author

jonathanpeppers commented Oct 31, 2017

It appears there is a change to the sdkmanager --licenses option:

Building target "_AcceptAndroidSdkLicenses" in project "/Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/build-tools/android-toolchain/android-toolchain.mdproj" ("/Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/build-tools/android-toolchain/android-toolchain.targets"); "Build" depends on it.
			Target _AcceptAndroidSdkLicenses:
			Task "AcceptAndroidSdkLicenses"
				Using task AcceptAndroidSdkLicenses from Xamarin.Android.BuildTools.PrepTasks.AcceptAndroidSdkLicenses, xa-prep-tasks, Version=1.0.6513.18753, Culture=neutral, PublicKeyToken=null
				Task AcceptAndroidSdkLicenses
				  AndroidSdkDirectory: /Users/builder/android-toolchain/sdk
				  JavaSdkDirectory: 
Error: Unknown argument --licenses
Usage: 
  sdkmanager [--uninstall] [<common args>] \
    [--package_file <package-file>] [<packages>...]
  sdkmanager --update [<common args>]
  sdkmanager --list [<common args>]

In its first form, installs, or uninstalls, or updates 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.
In its second form (with --update), currently installed packages are
    updated to the latest version.
In its third form, all installed and available packages are printed out.

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.

* If the env var REPO_OS_OVERRIDE is set to "windows",
  "macosx", or "linux", packages will be downloaded for that OS.
			Done executing task "AcceptAndroidSdkLicenses"

This PR updates the command to sdkmanager --update.

On Windows, the `lint` tool installed by the build was broken.
This causes several tests to fail on Windows verifying features
around `lint` After looking into it, it appears the URLs used to
download the SDK tools were not found in:

https://dl.google.com/android/repository/repository-12.xml

The correct URLs appear to be of the form `tools_rx.x.x-platform.zip`.
Note Google uses `macosx` in this file name instead of `darwin`.
Not sure what version of the SDK tools were being used previously,
they must be a prerelease or nightly release.

Other changes:
- The command `sdkmanager --license` is now `sdkmanager --update`
jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this pull request Oct 31, 2017
Context in dotnet#992

The `lint.bat` tool installed to `~\android-toolchain\sdk\tools\bin`
appears to be broken on Windows, so a few tests are failing that use it.
Since the issue appears to be with the Android SDK, it is a lot simpler
to just ignore these two tests on Windows.
@jonathanpeppers
Copy link
Member Author

Closing in favor of #994

jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this pull request Nov 3, 2017
Context in dotnet#992

The lint.bat tool installed to ~\android-toolchain\sdk\tools\bin
appears to be broken on Windows, so a few tests are failing that use it.

There is a workaround to set the `JAVA_OPTS` environment variable
that gets these tests passing on Windows. Hopefully, this is a temporary
workaround until a new version of the SDK tools comes out that fixes
this issue.

One other thing to note here is that the Android SDK installed by Visual
Studio uses the SDK tools version 25.x, which does not appear to have
this issue on windows.
@jonathanpeppers jonathanpeppers deleted the sdk-tools-update branch April 26, 2023 15:31
@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants