Error message in a new MonoGame Android project

I created a new MonoGame Android solution in Visual Studio Community on my Mac and I changed nothing in Activity1.cs, but I always get this error message:

LaunchMode = Android.Content.PM.LaunchMode.SingleInstance
The type or namespace name ‘Content’ does not exist in the namespace ‘androtest.Android’ (are you missing an assembly reference?) (CS0234)

What is wrong? What should I change?

Full code of Activity1.cs:

using Android.App;
using Android.Content.PM;
using Android.OS;
using Android.Views;

namespace androtest.Android
{
[Activity(Label = “androtest.Android”
, MainLauncher = true
, Icon = “@drawable/icon”
, Theme = “@style/Theme.Splash”
, AlwaysRetainTaskState = true
, LaunchMode = Android.Content.PM.LaunchMode.SingleInstance
, ScreenOrientation = ScreenOrientation.FullUser
, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenSize)]
public class Activity1 : Microsoft.Xna.Framework.AndroidGameActivity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
var g = new Game1();
SetContentView((View)g.Services.GetService(typeof(View)));
g.Run();
}
}
}

I’m getting the same error.
But commenting/removing this line will fix it:
, LaunchMode = Android.Content.PM.LaunchMode.SingleInstance

TBH I have no idea what that line of code does, maybe someone else can clarify that

Thanx. It fixes the error.
In addition, there are no Android simulators installed, so I cannot run my application. How can I install Android simulators for Visual Studio Community on Mac?

You can just leave it as :slight_smile:
LaunchMode = LaunchMode.SingleInstance