xamarin.android

Could not load assembly 'System.Buffers' during startup registration

依然范特西╮ 提交于 2021-01-28 01:48:12
问题 My Xamarin form apps was running like 5 minutes ago then all of sudden it stop working. The apps close instantly after it started. Below shows message display at Visual studio output, Assembly Loader probing location: 'System.Buffers'. Could not load assembly 'System.Buffers' during startup registration. This might be due to an invalid debug installation. A common cause is to 'adb install' the app directly instead of doing from the IDE. Things that I tried but failed to resolve the problem,

Xamarin forms Add button in TabbedPage

会有一股神秘感。 提交于 2021-01-27 20:34:17
问题 I have a question. I created the following TabbedPage: <?xml version="1.0" encoding="utf-8" ?> <TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:views="clr-namespace:MyApp.Views" mc:Ignorable="d" x:Class="MyApp.Views.MainPage" xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration

In Xamarin I need to set marker in the center of the map and get the position

最后都变了- 提交于 2021-01-27 19:06:11
问题 I'm trying in Xamarin to add a marker in the center of the map that marker will be fixe and can not be dragged, the map below that marker can be dragged normally. I need to get the position of the map that was chosen by the user, I searched a lot for the internet and found nothing that could help me. This feature is widely used in the Uber app. 回答1: On iOS , you can use the RegionChanged on a MKMapViewDelegate subclass to get updates as the user scrolls the map. Use the MKMapView.Region to

How to create a Xamarin foreground service

纵然是瞬间 提交于 2021-01-27 18:46:59
问题 Trying to create my first Xamarin foreground service but can't find a suitable example. The examples in Microsoft documentation seem to be either incomplete or use depreciated Notification.Builder: https://docs.microsoft.com/en-us/xamarin/android/app-fundamentals/services/foreground-services https://docs.microsoft.com/en-us/samples/xamarin/monodroid-samples/applicationfundamentals-servicesamples-foregroundservicedemo/ I've found ONE code example that seems to be up to date, but I'm struggling

Custom controls disabled. There was an internal issue with the rendering process

落花浮王杯 提交于 2021-01-27 13:20:24
问题 I installed Xamarin 4.2.2.11 (00fa5cc) on VS 2013. How can I solve this error in designer: Custom controls disabled. There was an internal issue with the rendering process. This is my sdk manager This is the designer. 来源: https://stackoverflow.com/questions/42038340/custom-controls-disabled-there-was-an-internal-issue-with-the-rendering-process

Unable to use System.XML.Linq

霸气de小男生 提交于 2021-01-27 12:43:18
问题 I am working on a project using Mono for Android. After reading a cross-platform document with Xamarin. I had my data layer in a separate project and was going to move it to my Mono for Android project and then link those files to my Mono Touch project, and one day perhaps a Windows Phone 8 project. When I moved the code, I am now unable to compile because of the System.Xml.Linq reference. The reference shows in the Mono for Android project, but I am unable to use it. I thought aiming for

Can't set Build Action to GoogleServiceJson

大城市里の小女人 提交于 2021-01-21 12:11:55
问题 I'm working with Xamarin-Android to make an application, so I need to set Build Action to my google-services.json file but there is no such Property as GoogleServicesJson, and when I try just to write it, it shows me an exception: Exception of type 'System.Runtime.InteropServices.ExternalException' was thrown. I tried to save and then restart Visual Studio, but it didn't solve the problem. If you know how to solve this problem, please help me! :) That's the file I'm clicking on 回答1: The

android Build.GetSerial() throwing exception

跟風遠走 提交于 2021-01-15 21:57:26
问题 I'm developing a Xamarin.Android project,where I need to get the Device Serial number. I have implemented it the way it is shown below. Also added the permissions in the manifest file: <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" /> string serial; if (Build.VERSION.SdkInt >= BuildVersionCodes.O) { serial = Build.GetSerial(); } else { serial = Build.Serial; } I have tried it on two

In android. Check whether mobile data is on or off

夙愿已清 提交于 2021-01-07 02:47:58
问题 My app need a function to check user's mobile phone has turned on the mobile data or not. I have referenced this link: #32239785 Here is the code provided in that topic boolean mobileYN = false; TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); if (tm.getSimState() == TelephonyManager.SIM_STATE_READY) { if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) { mobileYN = Settings.Global.getInt(context.getContentResolver(),

In android. Check whether mobile data is on or off

限于喜欢 提交于 2021-01-07 02:43:42
问题 My app need a function to check user's mobile phone has turned on the mobile data or not. I have referenced this link: #32239785 Here is the code provided in that topic boolean mobileYN = false; TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); if (tm.getSimState() == TelephonyManager.SIM_STATE_READY) { if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) { mobileYN = Settings.Global.getInt(context.getContentResolver(),