Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
After upgrading to SDK 24.3.4 if you add a switch to a layout file in an Android project targeting 5.1 the designer throws an exception. If you change the project to target a lower version then the layout loads properly.
Mac OSX Yosemite 10.10.4
- Start a new blank Android project
- Open the included layout file
- Drag on a switch
- Switch the project to target XA 5.1, check the layout, and then switch to target an earlier version and check again.
Expected: The layout should load
Actual: The layout loads when targeting pre 5.1, fails on 5.1.
Designer throws exception if switch added to a layout when targeting 5.1
##Steps to reproduce
Tested against all supported API’s listed below using the following method:
1. Open new Xamarin.Android project in Xamarin Studio
2, Open Project > Resources > layout > Main.axml
3. Drag & drop a Switch
4. Open project options
5. Go to Build > General > Target framework
6. Choose previous Android version
7. Select OK
8. Allow any layout changes to load
9. Repeat all steps, selecting a different target framework each time at step #6.
## Version information
=== Xamarin Studio ===
Version 5.9.5 (build 10)
Installation UUID: c442567b-f0ca-4cb3-b826-d4d99f1d8a93
Mono 4.0.3 ((detached/d6946b4)
GTK+ 2.24.23 (Raleigh theme)
Package version: 400030020
=== Apple Developer Tools ===
Xcode 6.4 (7720)
=== Xamarin.iOS ===
Version: 220.127.116.11 (Enterprise Edition)
Build date: 2015-08-04 13:52:25-0400
=== Xamarin.Android ===
Version: 18.104.22.168 (Enterprise Edition)
Android SDK: /Users/ashleyg/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
2.3 (API level 10)
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)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
=== Xamarin Android Player ===
Version: Unknown version
Location: /Applications/Xamarin Android Player.app
=== Xamarin.Mac ===
Version: 22.214.171.124 (Enterprise Edition)
=== Build Information ===
Release ID: 509050010
Git revision: 48d16bc4f12ce3938964fc7c3d72fdc6887ad4ad
Build date: 2015-08-18 16:55:24-04
Xamarin addins: c2d51b360ad9f59e689046d47030df27de28f94a
=== Operating System ===
Mac OS X 10.10.5
Darwin ashleyg.local 14.5.0 Darwin Kernel Version 14.5.0
Wed Jul 29 02:26:53 PDT 2015
Unable to reproduce the exception. Can you provide more detailed instructions or further information?
Do you see it in a new project from template?
If you can provide a sample demonstrating this behavior, that would be very helpful.
I did literally what you did, just added a switch to a blank project. I take it you are using the same SDK Tools as me as this is what caused the problem to appear. I also notice you are on OSX 10.10.5 wheras I am on 10.10.4. Probably unrelated but worth a mention.
I will see if I can upload a sample.
Created attachment 12659 [details]
Sample project demonstrating designer exception
To reproduce the exception:
- Set the project to target 5.1 (Options/Build/General/TargetFramework).
- Open the Main.axml layout
If you change the target to anything else then the layout will load properly with no exception.
Any update on this? Do you see the same problem when you load my example project?
Marking duplicate. Verified fix released.
*** This bug has been marked as a duplicate of bug 33174 ***
I see you have marked this as a duplicate of a different bug. I am up to date with Xamarin and still seeing these issues, is the fix supposed to be live, or is it in the beta / alpha channels? A little more info would have been nice instead of just closing my ticket.
Thanks for your help,
@Ryan - based on the descriptions you've provided, it seems that this issue is related to the one Ashley linked.
I can not reproduce using your sample project or a project created from template. If you're still seeing the issue, please do the following:
1. Ensure your Xamarin installation is up to date with the newest stable channel
2. Try removing and resinstalling the Android build tool 24.3.4
3. If you still see an error, please:
3a. Take a screenshot of said error
3b. Copy the entire text of said error and paste it in a Gist or attach as a text file to this bug
3c. Retrieve and attach your full Xamarin Studio version information from "Xamarin Studio -> About Xamarin Studio -> Show Details -> Copy Information [button]" to this bug