Error When Compiling Xamarin Project

Asked

Viewed 73 times

0

I just created a project in Xamarin, I added nothing in the project but when I try to compile it returns the error:

Java.lang.Illegalstateexception: You need to use a Theme.Appcompat Theme (or Descendant) with this Activity.

Someone can help me?

1 answer

0

If you put in the Activity code it would be easier to find out, but most likely you are inheriting your Activity(s) from the class AppCompatActivity, so the theme of that(s) Activity(s) needs to be Appcompat, to solve just go in values and then in styles.xml (if not, go straight to AndroidManifest.xml) and change the android:theme="" for "Theme.AppCompat" or for some compatible (This will change the theme of the whole project, if you want to change only one Activity can declare it on AndroidManifest.xml and set the theme only for her, but this is unnecessary if you just want to resolve this error)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.