0

I'm trying to change the Android's theme of a Xamarin project. To do this I'm changing the AndroidManifest.xml adding the clausule <application android:theme="@android:style/Theme.DeviceDefault.Light" android:label="MyApp.Android"></application> and erasing the Theme = "@style/MainTheme" in MainActivity.cs but it just crash and doesn't open the App.

How could I do this ?

FernandoPaiva
  • 4,410
  • 13
  • 59
  • 118
  • 1
    Can you add relevant `adb logcat` regarding the crash? Chances are, you have something malformed in your AndroidManifest.xml or similar. – Jon Douglas Apr 26 '19 at 04:50
  • 1
    I would suggest you check adb logcat and output window you would probably get your answer there! – FreakyAli Apr 26 '19 at 06:16

1 Answers1

1

Change the Java inheritance from AppCompatActivity to Activity, then you will solve this issue.

Please take a look the following thread for detailed info:

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

Cherry Bu - MSFT
  • 10,160
  • 1
  • 10
  • 16