[Xamarin.Android.Tools.AndroidSdk] Improve utility of JDK warnings #87
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: dotnet/android#4567
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=3781637&view=logs&j=aacb7678-d5ef-5d73-dd2c-3def32e966f3&t=36563657-e889-567e-4d1d-090ca934735a
We're trying to get our CI to use JDK11 (dotnet/android#4567),
for which we added support for a
JI_JAVA_HOME
environment variable"override"; see 13cc497.
However, even with
JI_JAVA_HOME
set,nuget restore
still fails:The question is why it's an invalid JDK directory. (It certainly
looks like it should be valid!)
While we do print out the contents of
e.ToString()
, this is onlywritten as "verbose" output, which isn't captured by
nuget restore
.As such, we have no idea why the JDK directory is not considered valid.
Update the warning message that Java.Interop emits when checking JDK
locations so that it includes
Exception.Message
, e.g.This will hopefully provide enough detail to let us know why it's
failing.