Questions tagged [xamarin.android]

Xamarin.Android (previously known as Mono for Android) is an implementation of Mono that runs on the Android platform, allowing you to write Android applications in C# using native Android libraries as well as using the .NET BCL (Base Class Libraries). Use this tag for issues that only occur when using Xamarin.Android, or when using Android-specific features.

Xamarin.Android (previously known as Mono for Android) is an implementation of Mono that runs on the Android platform, allowing you to write Android applications in C# using native Android libraries.

###Links:

18757 questions
385
votes
14 answers

appcompat-v7:21.0.0': No resource found that matches the given name: attr 'android:actionModeShareDrawable'

When attempting to use the latest appcompat-v7 support library in my project, I get the following…
228
votes
22 answers

Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] even if app appears to not be installed

When trying to deploy my app to the Android device I am getting the following error: Deployment failed because of an internal error: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] I am aware of this question but the app is not installed. It has been…
YKa
  • 3,998
  • 4
  • 20
  • 31
164
votes
5 answers

FragmentPagerAdapter Exists Only In Android.Support.V4.App (and not Android.App)

I cannot find find FragmentPagerAdapter within Android.App. I do not want to use the Fragment's from Android.Support.V4.App, as my target API is 14 and higher (Android 4.0 and up). So, I want to just use plain of Android.App.Fragments, and there…
samus
  • 6,102
  • 6
  • 31
  • 69
138
votes
14 answers

How to change shape color dynamically?

I have
chobo2
  • 83,322
  • 195
  • 530
  • 832
99
votes
7 answers

The project is missing Android SDKs required for building

I'm attempting to build my first F# Android project in Visual Studio 2017 (Community Edition). Immediately after creating a new project by using the F# - Android - Blank App template, the error window in Visual Studio displays the following…
Roger Lipscombe
  • 89,048
  • 55
  • 235
  • 380
96
votes
10 answers

PushAsync is not supported globally on Android, please use a NavigationPage - Xamarin.Forms

I have the following method in an Xamarin.Forms.ContentPage wired to a button click event public class LoginPage : ContentPage { private Button _loginButton = null; private Entry _PasswordInput = null; private Entry _UsernameInput =…
Michael Kniskern
  • 24,792
  • 68
  • 164
  • 231
91
votes
6 answers

Custom Layout for DialogFragment OnCreateView vs. OnCreateDialog

I'm trying to create a DialogFragment using my own Layout. I've seen a couple different approaches. Sometimes the layout is set in OnCreateDialog like this: (I'm using Mono but I've gotten somewhat used to Java) public override Android.App.Dialog…
gghuffer
  • 1,133
  • 1
  • 9
  • 15
80
votes
9 answers

Getting OutOfMemoryException in Xamarin

java.lang.OutOfMemoryError. Consider increasing the value of $(JavaMaximumHeapSize). Java ran out of memory while executing 'java.exe' I am getting out of memory exception in my visualstudio Xamarin Project Please help me how can i resolve…
Srinivas Ch
  • 1,202
  • 2
  • 19
  • 34
79
votes
4 answers

How can I programmatically include layout in Android?

I'm looking for a way to include a layout programmatically instead of using the XML tag include like in my example:
slama007
  • 1,273
  • 2
  • 18
  • 34
63
votes
17 answers

Xamarin Android - How to rebuild Resource.designer.cs

In Xamarin Android - How to regenerate the Resource.designer.cs I tried to mark all the XML file's Build Action as "AndroidResource" and still the Resource.designer.cs won't get updated with new values. What event trigger generating this file?
Karthik Murugesan
  • 1,100
  • 3
  • 13
  • 25
62
votes
1 answer

MarkerClick works but InfoWindowClick does not open ViewModel

The following MarkerClick implementation works, perfectly fine. I could be able to open other Views via ShowViewModel View.cs mMap.MarkerClick += MMap_MarkerClick; private void MMap_MarkerClick(object sender, GoogleMap.MarkerClickEventArgs e) { …
casillas
  • 16,351
  • 19
  • 115
  • 215
57
votes
3 answers

How to know the current OS / platform of the executing code (Android / iOS)

Using Xamarin.Android and Xamarin.iOS, I need to now the current OS in a shared code section. Be it an enum, an int or a string, it doesn't matter. I tried this: System.Environment.OSVersion Which is always "Unix" with some kernel version…
Askolein
  • 3,250
  • 3
  • 28
  • 40
52
votes
4 answers

MonoDroid: Error when calling constructor of custom view - TwoDScrollView

I am building an Android application that uses the custom-built TwoDScrollView found here: http://blog.gorges.us/2010/06/android-two-dimensional-scrollview/ This same class can be found referenced at several other websites, and others on Stack…
49
votes
4 answers

How do I use SharedPreferences in Xamarin.Android?

I want to save and retrieve some application settings in my Xamarin.Android project. I know that in Android (java), I use the class SharedPreferences to store this information, but I do not know how to convert that to Xamarin C#. When I type…
Richard Le Mesurier
  • 29,432
  • 22
  • 140
  • 255
48
votes
4 answers

Anyone have experience with architecture for cross platform WP7 Android iOS mobile development (monotouch, monodroid, C#)

This question is specifically related to a recommended architecture and people's previous experiences for cross-platform WP7, iOS, Android apps developed using C#, Monotouch and Monodroid respectively. I have researched previous questions here,…
1
2 3
99 100