I have downloaded VS For Mac Preview and created a new Xamarin Forms IOS/Android Solution using the portable library. When i try and load the XAML designer though to view the startup page I get the error "Invalid XAML : default constructor not found for Xamarin.Forms.Applicaton". I have not made any changes to the project code generated by VS For Mac and the only thing I did was to build the Android project as this is required before the designer can be opened. I also had to download the latest versions of the Android SDK via the SDK Manager.
Does anyone have any idea what is wrong
Thanks
Steve
Firstly, there are two preview modes, one for iOS and one for Android - if you can't see both tabs, drag the frame over a bit. I can't currently get the Android preview to work right even though it builds, but for iOS to work it looks like you simply need to update the Xamarin.Forms package. Go to the 'Project' menu and select 'Update NuGet Packages.' Then, restart Visual Studio for Mac and it should be working. It is very slow to load, however. I had to rebuild my project and select 'Update NuGet Packages' a second time before it actually showed up.
I'm still trying to figure out why Android preview does not work.
Related
The error is look like this:
missing icons error when uploading app to applestore
I fixed this kind of issues by updating the Assets.xcassets before( just reassign the icon which reported with issues).
But today it doesn't work for all kinds of workaround.
My visual studio for mac version is: 8.9.10 (build 4)
Suspect it's a visual studio bug and waiting next release to see.
Are you using ImageCropper.Forms nuget or not ? Here is a known issue : https://github.com/xamarin/xamarin-macios/issues/6095 .
Maybe you can try to create a new ImageAsset catalog and fill the image inside AppIcons ,then reselect it in info.plist.
Refer to
https://github.com/xamarin/xamarin-macios/issues/6095#issuecomment-550414189
Recently I decided to try using Xamarin for developing simple Android applications.
However, I encountered a problem that the Android Designer for layouts either does not work (in latest stable VS 2017) or shows just a blank page (in latest VS 2017 Preview).
Are there any additional steps to set it up or how can I fix this?
As it happens, Xamarin Designer will not work properly (like the behavior described in my question) if you do not have the correct folder structure. I.e. the layout documents must be in the Resources/layout folder, otherwise the Designer will fail.
I already reported this to VS Community and they said that they will have a look at this issue. Hope they will fix it soon.
When I launch UWP project, it crashes and I'm getting errors like these.
And this error occurs mostly when its on debugging mode.
Soo.. first idea for fixing this was upgrading/downgrading nuggets, but that didn't help me, also I have these nuggets included for UWP:
Microsoft.NETCore.UniversalWindowsPlatform
SQLite.Net-PCL
System.Data.SQLite
Xamarin.Forms
XLabs.Forms
etc other(that dosent matter on this exception)
I also looked other posts for solving this, like adding SQLite extension, but I didnt find the extension from Universal Windows->Extensions.
Im pretty stuck with this problem, I think its probably a problem with nuggets
You were fairly close. Go to Tools > Extensions and Updates. Click the Online tab in the left hand menu.
Search for SQLite and download SQLite for Universal Windows Platform.
Now go back to the Extensions window, as you showed above, and tick the SQLite for Universal Windows Platform. Ensure you keep the Visual C++ 2015 Runtime ticked, you need this as well.
I created a new android layout file using visual studio 2015 and am unable to view with the designer that is built in to visual studio.
After selecting 'design' tab, I just see a waiting icon in the center of the view and it never finishes. After a while, i have to close the design tab and open in xml editor. The form is valid as it runs fine in emulator.
ideas?
I was able to resolve after uninstalling all platforms using Android SDK Manager and re-installing each platform 1 by 1. If there is an issue with the installation nothing will be installed (note: watch the logs for errors and review after each platform is installed)
Initially, I did have to manually download SDK Manager and copy the tools folder to my existing installation. I am not sure why my Tools folder was empty but after performing this step I could again run SDK Manager.
Edit: the described issue below occurs also in a Win 10 UWP application (VS2015, Win10) when using the MapControl.
I have a weird problem using the MapControl in a Windows Phone 8.1 (universal app) application. After adding the control to a page, Visual Studio says The name "MapControl" does not exist in the namespace "using:Windows.UI.Xaml.Controls.Maps". Building the app works, I can deploy it to the phone and the map is shown and everything is fine - but I cannot use the Designer for this page any longer since it claims that error.
The problem occured in a bigger project originally started in VS2013 (update 4) on Windows 8.1. My first thought was that my VS-installation was kind of broken. But also after a clean new installation of Windows 10 (10240) and VS2015 RTM the problem occured. My steps to reproduce are quite simple:
Create a new project from template "Blank App (Universal Windows 8.1)"
Open the MainPage.xaml of the WindowsPhone subproject
Double click the MapControl in the toolbox
Note that the MapControl is added to the Grid in xaml and it is shown in side-by-side design view. Everything seems to be ok.
I can now add more controls to the page just by clicking the toolbox. I can modify the controls on the page with the mouse in the designer (e.g. rearrange them) and I can change their properties by the properties pane. Everything is still ok.
But when I either close and reopen that page (or the whole project) in the designer or when I start to edit the xaml directly with the keyboard, the designer fails and claims the error described above.
What's the problem here? How can I make Visual Studio designer to work with pages with MapControls again? First I thought of a bug in VS2013 - but that simple to reproduce, not fixed in VS2015 and no information about it on the internet? What did I wrong?
There is a bug on Visual Studio Tools for Universal Windows Apps 1.0 causing this issue with the map, installing this update should fix the issue Update
Procedure to correctly use the map sdk
Windows 8.1
Go to Tools-> extension and update -> install Bing Map SDK.
Right click on the project->Add reference->Windows->Extensions->Bing maps
Set configuration to x86 (Configuration Properties -> Configuration)
Add the map reference to your page using xmlns:maps="using:Bing.Maps"
Adding this line to your xaml <maps:Map />
and now you are good to go
Windows Phone and Windows 10 UAP
Add this reference in your xaml
xmlns:maps="using:Windows.UI.Xaml.Controls.Maps"
and then add this line to your xaml
<maps:MapControl />
Set configuration to x86 instead of "Any CPU". For prioritising fix upvote at https://connect.microsoft.com/VisualStudio/feedback/details/1659249/visual-studio-2015-rtm-uwp-the-name-mapcontrol-does-not-exist-in-the-namespace-using-windows-ui-xaml-controls-maps
Make the correct map library reference
xmlns:Maps="clr-namespace:Microsoft.Phone.Maps.Controls;assembly=Microsoft.Phone.Maps"
Instead of
xmlns:Maps="using:Microsoft.Phone.Maps.Controls;assembly=Microsoft.Phone.Maps"