2015-10-20 59 views
0

這是該項目的「 style.xml這是預先與libgdx項目設置產生的想法開始說‘@android:主題爲’丟失,而無法解析」 @android:風格/動畫」, 「@機器人:彩色/透明」的IntelliJ缺少「@android:主題爲」

<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> 

我試了一下: -invalidating緩存 -delete workspace.xml -delete的.idea文件夾 -reinstall Android SDK -reinstall Intellij -reload the proj來自gradle。

到目前爲止沒有工作。

回答

0

資源參考的格式是@<resource_type>/<resource_name>。格式@android:<resource_type>/<resource_name>的工作方式相同,但引用了平臺資源。

@android:Theme的問題在於它缺少資源類型和正斜槓以從資源名稱中劃定類型。

主題屬於「風格」資源類型,讓你真正想要的是這樣的:

<style name="GdxTheme" parent="@android:style/Theme"> 
    <!-- ... --> 
</style> 

至於與"@android:style/Animation""@android:color/transparent"問題 - 這些都是有效的資源引用,但應參考不被引號包圍。引號會將這些引入字符串中,而不是引用。只要刪除這些,你應該很好。

+0

Okey,父母現在已修復。剩下的部分仍然是錯誤的:/ – Frontrider

+0

您應該只能從兩個資源引用問題中刪除引號 - 只是更新了我的答案以包含該信息。 –