Error Theme.AppCompat on Xamarin Android

0

I get the following error when wanting to run an Android Xamarin App

You need to use a Theme.AppCompat theme (or descendant) with this activity

this is my manifest.xml file

   <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="KobitAndroidBeta.KobitAndroidBeta" android:versionCode="1" android:versionName="1.0">
  <uses-sdk android:minSdkVersion="16" />
  <application android:label="KobitAndroidBeta"></application>
</manifest>

And this is my style file

<?xml version="1.0" encoding="UTF-8" ?>
<resources>
  <style name="MyTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="windowNoTitle">true</item>
    <item name="windowActionBar">false</item>
    <item name="colorPrimary">#2196F3</item>
    <item name="colorPrimaryDark">#1976D2</item>
    <item name="colorAccent">#FF4081</item>
  </style>
  <style name="MyTheme" parent="MyTheme.Base">
  </style>
</resources>
    
asked by Oscar Navarro 16.08.2017 в 23:03
source

1 answer

1

In your activity, add:

[Activity(Label = "DrawerMenu", Theme = "@style/MyTheme.Base")]

Greetings.

    
answered by 16.08.2017 / 23:05
source