您需要在此活动中使用Theme.AppCompat主题(或后代)
Android Studio 0.4.5 用于创建自定义对话框的Android文档:http : //developer.android.com/guide/topics/ui/dialogs.html 如果需要自定义对话框,则可以将“活动”显示为对话框,而不是使用Dialog API。只需创建一个活动,然后在<activity>清单元素中将其主题设置为Theme.Holo.Dialog即可: <activity android:theme="@android:style/Theme.Holo.Dialog" > 但是,当我尝试此操作时,出现以下异常: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity 我支持以下内容,并且我不能使用大于10的值: minSdkVersion 10 targetSdkVersion 19 我的风格如下: <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> 在清单中,我有此活动: <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:theme="@android:style/Theme.Holo.Light.Dialog" android:name="com.ssd.register.Dialog_update" android:label="@string/title_activity_dialog_update" …