Skip to content

Conversation

@jonpryor
Copy link
Contributor

The VSTS build environment was updated to install Java 9.0.1.
This promptly broke everything when building
tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding:

Executing: ./gradlew assembleDebug --stacktrace
...
* What went wrong:
Could not determine java version from '9.0.1'.
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
java.lang.IllegalArgumentException: Could not determine java version from '9.0.1'.
        at org.gradle.api.JavaVersion.toVersion(JavaVersion.java:70)
        at org.gradle.api.JavaVersion.current(JavaVersion.java:80)

The fix is to upgrade to Gradle 4.3 or later, which supports Java 9.

To upgrade the Gradle used, run:

./gradlew wrapper --gradle-version=4.4 --distribution-type=bin --stacktrace

The VSTS build environment was updated to install Java 9.0.1.
[This promptly broke everything][vsts-build] when building
`tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding`:

[vsts-build]: https://devdiv.visualstudio.com/DevDiv/_build/index?buildId=1224076

	Executing: ./gradlew assembleDebug --stacktrace
	...
	* What went wrong:
	Could not determine java version from '9.0.1'.
	* Try:
	Run with --info or --debug option to get more log output.
	* Exception is:
	java.lang.IllegalArgumentException: Could not determine java version from '9.0.1'.
	        at org.gradle.api.JavaVersion.toVersion(JavaVersion.java:70)
	        at org.gradle.api.JavaVersion.current(JavaVersion.java:80)

The fix is to upgrade to Gradle 4.3 or later, which supports Java 9.

To upgrade the Gradle used, run:

	./gradlew wrapper --gradle-version=4.4 --distribution-type=bin --stacktrace
@jonpryor jonpryor merged commit d29944a into dotnet:master Dec 14, 2017
jonpryor pushed a commit that referenced this pull request Aug 3, 2020
Context: xamarin/android-sdk-installer@2b4d1a6

Changes: xamarin/monodroid@5784a74...b12a3e8

  * xamarin/monodroid@b12a3e8d5: Bump to xamarin/android-sdk-installer@2b4d1a6 & xamarin/xamarin-android/master@d583b7c (#1107)
  * xamarin/monodroid@3d84feddd: Bump to xamarin/xamarin-android/master@f0d565fe (#1106)
  * xamarin/monodroid@ec2931825: Bump to xamarin/android-sdk-installer@c6c12db0 (#1105)

Sometimes, `<InstallAndroidDependencies/>` would fail when running on
Windows, a'la:

	…\Xamarin\Android\Xamarin.Installer.Common.targets(12,3): Cannot access a disposed object.
	Object name: 'SslStream'.

A fix for the `ObjectDisposedException` has been brought in via the
`android-sdk-installer` bump in xamarin/monodroid@b12a3e8d.

The `<InstallAndroidDependencies/>` test previously had issues due to
clean up logic in the test framework that partially deleted the newly
provisioned Android SDK on a subsequent build.  I believe that we've
been seeing successful results for this test because the subsequent
build in the test would fall back to a different Android SDK that was
already on disk.  The test has been improved by asserting that the
newly installed Android SDK is used during the subsequent build.
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 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.

1 participant