A theme must be used. When attempting to start an Android application, a typical error message shows the AppCompat theme (or descendant) with this activity.
The activity of the program must utilize a specified theme, as mandated by the Android operating system, which leads to this problem.
What causes the error?
The AppCompat theme is part of the android support library. compatible with older versions of android. If you are using a different theme, your application may not run correctly on older devices.
How to fix the error ?
You need to ensure that the application's main activity is using a Theme. Appcompat theme at its parent theme.
Step #1: Open the AndroidManifest.xml file
Step #2: Locate the main activity for your application.
Step #3: Add the theme to the main activity. To add a theme to the main activity.
Step #4: Restart the application and you will find that the error has been fixed.In project set Theme.AppCompat.Light or Theme.AppCompat.Light.DarkActtionBar.
Step #5: Change the theme in the themes.xml file
Happy coding!