更新我的android sdk版本到r12後,我得到了以下錯誤。Android自定義警報對話框更新後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 !!! –
...但後來在下面的評論中,他們說使用'@android:style/Theme.Dialog'實際工作。 –