前言
今天用Android Studio 生成Activity的时候,默认继承AppCompatActivity ,而在AndroidManifest.xml我对该Activity设置了一个主题,然后运行的时候报了错误:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xtc.watch/com.xtc.watch.view.defaultprompt.activity.DefaultPromptActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
如下所示:
java.lang.RuntimeException: Unable to start activity ComponentInfo{
com.xtc.watch/com