Skip to content

There is no longer an informative error message printed when building against a platform SDK version that is not installed #1136

Closed

Description

@pjcollins

Steps to Reproduce

  1. Ensure you don't have API 27 installed, or remove/rename $(AndroidSdk)/platforms/android-27.
  2. msbuild *.csproj /p:TargetFrameworkVersion=v8.1

Expected Behavior

An informative and actionable error message is displayed when the platform SDK you are attempting to compile against does not exist on disk:

Build FAILED.

"/Users/petercollins/git/monodroid-samples/Button/DroidButton.csproj" (default target) (1) ->
(_ValidateAndroidPackageProperties target) -> 
  /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(582,2): error : Could not find android.jar for API Level 26. This means the Android SDK platform for API Level 26 is not installed. Either install it in the Android SDK Manager (Tools > Open Android SDK Manager...), or change your Xamarin.Android project to target an API version that is installed. (/Users/petercollins/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-26/android.jar missing.) [/Users/petercollins/git/monodroid-samples/Button/DroidButton.csproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.18

Actual Behavior

An error code XA5207 is displayed with no error message. This is a regression from d15-5.

Build FAILED.

"/Users/xamarinqa/myagent/_work/r3/a/monodroid-samples/Button/DroidButton.csproj" (SignAndroidPackage target) (1) ->
(_ValidateAndroidPackageProperties target) -> 
  /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(591,2): error : XA5207 [/Users/xamarinqa/myagent/_work/r3/a/monodroid-samples/Button/DroidButton.csproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.27

Version Information

XA d15-6 (8.2.0.0)

Log File

http://xqa.blob.core.windows.net/gist/log-50a50d738cd544ed9e61ed3764e9b6f7.txt

Activity

  1. added
    bug
    on Dec 21, 2017
  2. added this to the d15-6 milestone on Dec 21, 2017
  3. added a commit that references this issue on Jan 3, 2018
    9c2082c
  4. added and removed
    bug
    on Jan 3, 2018
  5. jonpryor commented on Jan 4, 2018

    @jonpryor
    Contributor

    Cherry-picked to d15-6 as: 6aabfef

  6. pjcollins commented on Jan 9, 2018

    @pjcollins
    MemberAuthor

    Verified in monodroid/d15-6/b6dfc0ad4 (Xamarin.Android 8.2.0.3).

  7. ghost locked as resolved and limited conversation to collaborators on Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions