您的位置:首页 > 移动开发

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

2015-05-26 18:34 525 查看
创建的第一个应用打开模拟器报错如下:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.itheima.mobilesafe/com.itheima.mobilesafe.SplashActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant)
with this activity.

解决办法:把extends ActionBarActivity改成extends Activity,导包之后就正常运行了。这是因为Android studio默认创建的时候是集成了ActionBarActivity
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐