错误日志
You need to use a Theme.AppCompat theme (or descendant) with this activity.
解决方法
参考的这位博主
http://blog.csdn.net/crazyman2010/article/details/46560387
style里改成这样就行了
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="alertDialogTheme">@style/AppTheme.Dialog.Alert</item>
</style>
<style name="AppTheme.Dialog.Alert" parent="Theme.AppCompat.Light.Dialog.Alert">
</style>
androidManifest.xml 记得引用
另外,浏览了下其他帖子,引用@android:style/Theme.NoTitleBar也会出现这种问题,详情点击下面的链接查看