[英]Android Custom Alert Dialog Error after updating android sdk r12
I got the following error after updating my android sdk revision to r12. 将android sdk版本更新为r12后,出现以下错误。
error: Error retrieving parent for item: No resource found that matches the given name '@android:style/AlertDialog'.
Here is my xml file. 这是我的xml文件。
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="CustomDialogTheme" parent="@android:style/AlertDialog">
<item name="android:windowFrame">@null</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowAnimationStyle">@android:style/Theme.Dialog</item>
</style>
</resources>
I didn't change anything in the code and the only thing that I did was upgraded the Android SDK. 我没有更改代码中的任何内容,唯一要做的就是升级了Android SDK。
android:style/AlertDialog
is not a public style and you should not use it. android:style/AlertDialog
不是公共样式,您不应使用它。 Please refer to this thread How to change theme for AlertDialog 请参考此主题如何更改AlertDialog的主题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.