Questions tagged [xamarin]

Xamarin is a platform consisting of Xamarin.iOS, Xamarin.Android, Xamarin.Mac and Xamarin Test Cloud. It allows you to write cross-platform native Apps for iOS, Android and Mac and follow your app through its entire lifecycle. The introduction of Xamarin.Forms supports Native UI development for iOS, Android and Windows

is a platform consisting of , , , , and . The platform provides tools for the entire lifecycle of an App - developing, test and DevOps. This platform allows you to write cross-platform native applications for , and using , allowing you to share a lot of code between platforms.

Tag Usage

When using the , you should also include the related Xamarin platform tag your question relates to.

If you are describing a question about a crash in your app, please include a complete stack trace and, preferably, a minimal reproducible sample.

History

Xamarin was founded in May 2011 and is headquartered in San Francisco, with an engineering office in Boston, MA. Xamarin was acquired by Microsoft in February 2016.

At Microsoft's Build 2016 developer conference on March 31st, 2016, Microsoft announced a new licensing scheme; including Xamarin with all Visual Studio and Visual Studio for Mac versions, including Visual Studio Community edition. And now, Xamarin is free for anyone to use with Visual Studio, on either Mac or Windows

Xamarin created the Xamarin Platform which includes Visual Studio for Mac as well as a plug-in for Visual Studio on Windows, which can be used to develop native mobile applications for Windows, iOS, and Android platforms using the .NET framework.

The Xamarin Platform includes Xamarin.iOS, Xamarin.Android, and Xamarin.Mac (for macOS), which allows for the development of C# and .NET applications with full access to the native APIs. This allows for code sharing between platforms and the creation of applications for multiple platforms with a native user experience.

Xamarin 3 introduced , a framework for creating UI from code shared between platforms.

Xamarin 4 introduced a new SSH-based build host, to replace the old and buggy build host. The build host provides the connection between Visual Studio and the Mac in order to be able to build and deploy iOS applications.

Since June 2017 the Xamarin Platform supports libraries shifting and expanding the previous Portable Class Library (PCL). It enhances access to APIs within the .NET base class libraries and supports more platforms.

Resources

Books

Chat Rooms

50490 questions
45
votes
6 answers

Xamarin.Android Proguard - Unsupported class version number 52.0

I'm trying to use Proguard in my Xamarin.Android project, yet the compilation fails with the error Unsupported class version number [52.0] (maximum 51.0, Java 1.7) I saw from those two questions that it may be a mismatch between Java 7 and Java 8,…
Eino Gourdin
  • 4,169
  • 3
  • 39
  • 67
45
votes
3 answers

How to Add Click event in Stack Layout or Frame

I am new in xamarin.forms please help me out how i can add click event in Stack Layout or Frame
Atul Dhanuka
  • 1,453
  • 5
  • 20
  • 56
45
votes
5 answers

Get Length of array JSON.Net

How can I get the length of a JSON Array I get using json.net in C#? After sending a SOAP call I get a JSON string as answer, I use json.net to parse it. Example of the json I got: {"JSONObject": [ {"Id":"ThisIsMyId","Value":"ThisIsMyValue"}, …
Onno
  • 737
  • 1
  • 6
  • 20
43
votes
4 answers

MVC 5 on Mono: Could not load file or assembly 'System.Web.Entity' or one of its dependencies

Goal: Startup a ASP.NET MVC 5 project on Mono via Xamarain Studio. Error after starting server: Could not load file or assembly 'System.Web.Entity' or one of its dependencies. Error in Xamarin Studio: Background: The project was created in Visual…
jeffmaher
  • 1,824
  • 3
  • 21
  • 20
42
votes
3 answers

Xamarin.Messaging.Broker wants firewall access

After installing VS2019 16.5.1 and 16.5.2 I receive a message that Windows Defender has locked some features of Xamarin.Messaging.Broker and asking if I should allow it. Normally I would as it seems to be part of Visual Studio but this executable is…
John Mackerras
  • 525
  • 1
  • 4
  • 10
42
votes
9 answers

Setting the Color of a TextView Drawable

Im trying to change the color of a TextView Drawable in Xamarin. In Java you can do it like this: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView txt = (TextView)…
CDrosos
  • 2,418
  • 4
  • 26
  • 49
42
votes
2 answers

Global Exception Handling in Xamarin Cross platform

Can you please let me know how to handle the global exception(without App crash) in Xamarin Cross platform project.
42
votes
9 answers

Is it possible to use a Xaml designer or intellisense with Xamarin.Forms?

Xamarin 3.0 introduced Xamarin.Forms, a powerful UI abstraction that allows developers to easily create user interfaces that can be shared across Android, iOS, and Windows Phone. It seems very powerful but I'm facing a few difficulties to create UI…
Cybermaxs
  • 24,378
  • 8
  • 83
  • 112
41
votes
2 answers

Xamarin Android - Turn off Mono Logs

This might be a nit-picky thing, but in Xamarin when running an Android app, it dumps tons of lines in the console that start with [Mono] Is there any way to disable these logs? Thanks in advance
julianwyz
  • 3,104
  • 1
  • 29
  • 34
40
votes
3 answers

Change default timeout

I have the following implementation. And the default timeout is 100 seconds. I wonder how can I able to change the default timeout? HttpService.cs public class HttpService : IHttpService { private static async Task GoRequestAsync(string url,…
casillas
  • 16,351
  • 19
  • 115
  • 215
40
votes
6 answers

How to enable migrations in Visual Studio for Mac

I have Visual Studio for Mac and I'm trying to learn Xamarin with Azure using the following tutorial: https://adrianhall.github.io/develop-mobile-apps-with-csharp-and-azure/chapter3/server/ At some point, I have to enable EF migrations. The tutorial…
franswa
  • 836
  • 1
  • 9
  • 21
40
votes
5 answers

Get current Activity - Xamarin Android

I am developing an portable App for Android and iOS. My current function is taking a Screenshot and use that image in the code. Therefor I have an Interface in the portable library. public interface IFileSystemService { string…
Lexu
  • 579
  • 1
  • 5
  • 14
40
votes
11 answers

java Lang UnsupportedClassVersion Error in Xamarin Studio

I am getting the following error when I am building my project . How do I correct this ? C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error: java.lang.UnsupportedClassVersionError: com/android/dx/command/Main …
Seinfeld
  • 680
  • 1
  • 8
  • 13
40
votes
22 answers

Android App Compile Not Generating Package Resources

When attempting to compile my Xamarin.Android app I get the compile error: Error 3 The file "obj\Debug\android\bin\packaged_resources" does not exist. MyApp.UI.Droid This error occurred after I made some changes (added some new classes - cannot…
sazr
  • 24,984
  • 66
  • 194
  • 362
40
votes
12 answers

The "LinkAssemblies" task failed unexpectedly

When we are trying to build a xamarin forms project in release mode, we are getting the error: C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(5,5): Error MSB4018: The "LinkAssemblies" task failed…
Kartik
  • 1,506
  • 2
  • 17
  • 28