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 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.
Attempting to preview a trivial ContentPage with a single button in Forms Previewer results in the error, "Failed to render Android XAML preview". This is on a project with an Android target, but no iOS target (so #45142 would apply, but its fix should be in place).
The ContentPage in a PCL project.
Can you attach the logs from the session which failed? I believe you can get them by clicking Help -> Xamarin -> Zip Xamarin logs.
there have also been a lot of changes between the 4.3 release and the 4.4 release. If possible I would recommend you try the latest preview release of the Xamarin tools as the issue could already be fixed. You can get info about the new releases here: https://forums.xamarin.com/discussion/90944/beta-channel-and-vs-preview-15-1-aka-cycle-10-feature-preview
Created attachment 21161 [details]
2017-04-02_02-43-26.1468.Ide.log mentions the minimum SDK level. The API level for the project is API Level 15.
I believe you've hit the same issue as many other people. The only workaround for now is this: https://bugzilla.xamarin.com/show_bug.cgi?id=53891#c3
If that does not help please re-open the bug and we'll address it as soon as possible.
I have Android Xamarin.Android SDK 126.96.36.199 (3a62f1e) installed, as per 53891, but I still get the error.
Can you supply new log files now that you've installed the Android SDK manually? If everything went well i believe this file should now exist, C:\Program Files (x86)\MSBuild\Xamarin\Android\libmonosgen-2.0.dll, which means you should not have the *exact* same error in the logs.
The log files are the same, with very little data. There is no "C:\Program Files (x86)\MSBuild\Xamarin" folder.
It looks like the issue has to do with installation and versioning. I hadn't installed anything besides Microsoft's Visual Studio update before running the test in my previous comment. That seemed like enough, based on this technical bulletin that indicates that Visual Studio 2017 15.0.26228.12 obsoletes the manual installs:
It seems like something more is needed, however. The workaround comment on bug #53891 references version Xamarin 188.8.131.529, which is out of date. I'm running 184.108.40.2065. Is there a manual download for the current version that I'm supposed to install a portion of?
If that directory doesn't exist then the android SDK was not installed as expected. The best option at this point is probably to wait for our next stable release. It's due very soon and things should work out of box with that.
If you cannot wait for that then can you confirm that you installed just the `Xamarin.Android SDK` portion of the linked installer? That's the portion that should create that directory. I know it is a slightly out of date installer at this point, but the only user of files installed by that installer will be the android portion of the previewer and the binaries will be compatible with your slightly newer build.
Also, just to be clear, the usage of the manual installer is just a workaround while we wait for the actual fix to be released. Once the 15.1 update ships you will not need to use a manual installer.
I believe the fix has now shipped with the current stable release.