[英]Android Custom Alert Dialog Error after updating android sdk r12
将android sdk版本更新为r12后,出现以下错误。
error: Error retrieving parent for item: No resource found that matches the given name '@android:style/AlertDialog'.
这是我的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>
我没有更改代码中的任何内容,唯一要做的就是升级了Android SDK。
android:style/AlertDialog
不是公共样式,您不应使用它。 请参考此主题如何更改AlertDialog的主题
最后,我找到了答案。 我知道这不是正确的方法,但目前可以使用。
I managed to fix it by replacing the platform-tools_r06 with platform-
tools_r05 in android sdk folder
您可以从此处下载platform-tools-r05。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.