Bug 37858 - [Android] ScreenOrientation.UserLandscape fails with "Unsupported ScreenOrientation value"
Summary: [Android] ScreenOrientation.UserLandscape fails with "Unsupported ScreenOrien...
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 6.0.0
Hardware: PC Mac OS
: Highest normal
Target Milestone: ---
Assignee: dean.ellis
Depends on:
Reported: 2016-01-21 01:51 UTC by Kent Green [MSFT]
Modified: 2016-07-05 22:15 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

IDE Logs & sample to reproduce error (295.42 KB, application/zip)
2016-01-21 01:51 UTC, Kent Green [MSFT]

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 37858 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Kent Green [MSFT] 2016-01-21 01:51:59 UTC
Created attachment 14648 [details]
IDE Logs & sample to reproduce error

## Overview
From this enterprise desk case:

Customer reports that using the ScreenOrientation.UserLandscape fails to build the app. I was able to reproduce the issue by testing on my LG Volt API 19 device. 

## Code snippet
The orientation is set in the Activity flag
> [Activity(Label = "UserLandscape", MainLauncher = true, Icon = "@drawable/icon", 
> ScreenOrientation = ScreenOrientation.UserLandscape, LaunchMode = LaunchMode.SingleInstance,
> Theme = "@android:style/Theme.NoTitleBar")]

## Steps to reproduce
Attempt to build the app for an API 18 or higher device. The build fails with:
> Error: Error executing task GenerateJavaStubs: Unsupported ScreenOrientation value '11'. Parameter name: ScreenOrientation (UserLandscape)

## Expected behavior
The documentation states:
> "userLandscape" - "Added in API level 18"
- http://developer.android.com/intl/ru/guide/topics/manifest/activity-element.html

## Build Information
=== Xamarin Studio ===

Version 5.10.1 (build 6)
Installation UUID: 8ef63a7c-1b18-40de-a334-7f78777fcb55
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

=== Xamarin.Profiler ===

Location: /Applications/XamarinProfiler.Mac.app/Contents/MacOS/XamarinProfiler.Mac

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.Mac ===

Version: (Business Edition)

=== Xamarin.Android ===

Version: (Business Edition)
Android SDK: /Users/kentgreen/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 7322991
Branch: master
Build date: 2015-12-08 16:20:29-0500

=== Build Information ===

Release ID: 510010006
Git revision: 0b60eecdb531933734519c13257d16a780274aab
Build date: 2015-12-04 20:28:20-05
Xamarin addins: 9876fd7c9837977178411ec7375b4352c0a0d6af
Build lane: monodevelop-lion-cycle6-baseline

=== Operating System ===

Mac OS X 10.10.5
Darwin Kents-Macbook-Pro.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64

## Additional Info
Adding sample from customer & IDE logs from my reproduction of the issue with that sample.

The customer also reproduced it in XVS 3.11.1594 / XA
Comment 2 Kent Green [MSFT] 2016-01-21 18:59:35 UTC
The user also reported the same behavior with these elements:
> Locked
> FullUser
> UserPortrait
> UserLandscape

These all are essentially the same as this bug, though it is 4 separate elements instead of just one. Please let me know if it would be preferable to split these other occurrences into a separate bug report.