如何让aapt.exe在SDK Tools r12中解析Android样式

3
自从我将SDK工具更新到r12后,一个已有的项目(没有任何代码更改)现在在aapt生成过程中失败,错误信息如下:
[INFO] C:\Dev\Android-sdk\platform-tools\aapt.exe [package, -m, -J, C:\Source\android\Jumblee\target\generated-sources\r, -M, C:\Source\android\Jumblee\target\filtered-manifest\AndroidManifest.xml, -S, C:\Source\android\Jumblee\target\generated-sources\combined-resources\res, --auto-add-overlay, -I, C:\Dev\Android-sdk\platforms\android-10\android.jar] [INFO] C:\Source\android\Jumblee\target\generated-sources\combined-resources\res\values\theme.xml:16: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/WindowTitle. 资源文件中相关的行如下:
<!-- Set the theme for the window title -->
<!-- NOTE: setting android:textAppearance to style defined above --
<style name="CustomWindowTitle" parent="@android:style/WindowTitle">
     <item name="android:textAppearance">@style/CustomWindowTitleText</item>
</style>

有人看到类似的情况吗?或者更好的是知道发生了什么?
2个回答

1

好的,我提出的问题是http://code.google.com/p/android/issues/detail?id=18659

事实证明,@android:style/WindowTitle和其他一些人一直在使用的样式都不是公开的样式。

因此,正确的解决方案是停止使用这些私有样式。最合适的方法可能是将相关样式复制到您自己的项目中,并将其作为您自己的样式。


0
发现了热补丁,不过它只是热补丁而已。正在寻找更好的解决方案。

我现在确信这是平台工具中r06版本的一个bug。我已经为此问题提出了反馈,链接为http://code.google.com/p/android/issues/detail?id=18659。如果这个问题也给你带来了困扰,请给它点个赞。 - William

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接