[英]Intellij Missing “@android:theme”
這是項目的“ style.xml。這是使用libgdx項目設置預先生成的。”想法開始說“ @android:theme”丟失了,無法解析“ @android:style / Animation”,“ @ android” :color / transparent”。
<resources>
<style name="GdxTheme" parent="@android:Theme">
<item name="android:windowBackground">"@android:color/transparent"</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowAnimationStyle">"@android:style/Animation"</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowFullscreen">true</item>
</style>
我嘗試了什么:-使緩存無效-刪除工作區.xml-刪除.idea文件夾-重新安裝Android SDK-重新安裝Intellij-從gradle重新加載項目。
到目前為止沒有任何工作。
資源引用的格式為@<resource_type>/<resource_name>
。 @android:<resource_type>/<resource_name>
格式的工作方式相同,但是引用了平台資源。
@android:Theme
的問題在於它缺少資源類型,並且沒有從資源名稱中@android:Theme
類型的正斜杠。
主題屬於“樣式”資源類型,因此您真正想要的是:
<style name="GdxTheme" parent="@android:style/Theme">
<!-- ... -->
</style>
至於"@android:style/Animation"
和"@android:color/transparent"
,它們都是有效的資源引用,但引用不應用引號引起來。 引號會將它們變成字符串,而不是引用。 只要刪除那些,你應該會很好。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.