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.
Related
I have a Xamarin Forms 5 application that is having issues being debugged via Visual Studio.
The application has a root view with tabs and each has a ListView control. The application runs fine without any issues when started without debugging.
When debugging it seems that the ListViews are continually re-creating the cells, the descendants count just keeps going up indefinitely. To the point where the UI is unusable in any meaningful way due to the connection being swamped and the CPU continually hit.
It behaves this way when running either Android or iOS, hardware or simulator.
I've just loaded the exact same projects and solutions into JetBrains Rider 2021.3 and debugging using Rider works flawlessly, using both simulators and hardware.
The only common denominator is the Visual Studio debugger.
At this point I'm not entirely sure how to address the issue with debugging via Visual Studio. Are there any configuration options that would be worth experimenting with to try and solve this?
Please include your visual studio and xamarin forms version.
Possible issue : On vs you can change hot reload option in tool -> Option -> Hot reload. In the xamarin forms section, try to change the option from "Only change XF 5.0" to "Full Page".
note : the english name of those option might not be exact (my vs is in another language).
I've googled till I'm blue in the fingers trying to find a resolution to this issue. I've tried several things but nothing helps. I've got Xamarin and Visual Studio 2015 Enterprise. I had everything working on a previous PC a few months back. Now I have a new one and am just now getting Xamarin set up. I have a few demo and self hacked solutions I was working with. Now all of them give me the above error message. I've made sure the namespace is correct in all modules. The solutions are really small. Nothing fancy at all. Basically Hello World stuff so I'm at a failure to figure out why it fails now. Case in Point: The Hello World that is failing is one HelloWorld.cs file and a few PNGs in the Resources tree along with a main.xml.
If anyone could shed some light I would be most grateful.
I just updated (through VS) Xamarin. Now the older solutions I had won't load. If I create a new solution, I've got the same Resource does not exist error. Xamarin appears to be broken. I've worked with it in the past and had no problems like these.
I resolved it. My Xamarin version was not updated. I updated it by going to
Programs & Features => Microsoft Visual Studio Enterprise 2015, click on change/modify. Now in Visual Studio Popup under Cross Platform Mobile Developement update the C#/.NET (Xamarin v__). After updating this error gets resolved.
For me I didn't required to install Visual Studio 2017.
Also Thanks Martin for your suggestion, your answer can also workaround but it is not necessary to install 2017 just need to upgrade Xamarin version to work with VS 2015.
This bug currently arises with Visual Studio 2015. See this thread and this thread on the Xamarin Forums. Apparently the only workarounds now is to install Visual Studio 2017 or downgrade to older version of Xamarin. There is also an opened bug report for this, so it hopefully should get resolved 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 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.
I've tried searching on this issue (and I've come across many issues with people not being able to add NuGet packages), but have come across nothing that can solve my problem.
I'm using Xamarin Studio for Mac and I'm trying to add the SQLite package to my Xamarin Forms project. However, when I click to add a NuGet package (either by right-clicking on the project or from the Project tab at the top), nothing happens. No delay or anything — I click it, no lag, and I continue doing whatever else I want. Has anyone encountered this issue before? I've already tried quitting out of the app multiple times and this has not solved the problem. Thanks for any help you can provide.
In case you are still searching for an answer:
I've had the same strange problem.
This is a bug in Xamarin Studio 6.0.X (In some installation, probably depending on system configuration or something like that)
After updating to Xamarin Studio 6.1.X (alpha channel), it was working again ...
If I find the link where I've found this answer, I will post it later!