如何使 aapt.exe 解析 SDK Tools r12 中的 android 样式
自从将我的 SDK 工具更新到 r12 以来,现有项目(零代码 更改)现在在 aapt 生成期间失败:
[信息] C:\Dev\Android-sdk\platform-tools\aapt.exe [程序包、-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, --自动添加覆盖,-I, C:\Dev\Android-sdk\platforms\android-10\android.jar]
[信息] C:\Source\android\Jumblee\target\ generated-sources\combined-resources\res\values\theme.xml:16: 错误:检索项目的父级时出错:找不到资源 与给定名称“@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>
有没有人看起来类似? 或者更好地知道到底发生了什么?
Since updating my SDK Tools to r12, an existing project (with zero code
changes) now fails during aapt generation with:
[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.
The relevant lines from the resource file are:
<!-- 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>
Has anyone seem something similar?
Or better still know wtf is going on?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好的,我提出的问题是 http://code.google.com/p /android/issues/detail?id=18659
事实证明,@android:style/WindowTitle 和人们一直在使用的其他一些样式都不是已发布的样式。
所以正确的解决方案是停止使用这些私有样式。最合适的方法可能是将相关样式复制到您自己的项目中并使其成为您自己的样式。
OK the issue I raised was http://code.google.com/p/android/issues/detail?id=18659
It turns out that @android:style/WindowTitle and a few other styles that people have been using are not published styles.
So the proper solution is to stop using those private styles. And the most appropriate way of doing that it is probably to copy the style in question to your own project and make it your own style.
找到修补程序,但确实是这样只是热修复。寻找更好的解决方案。
Found Hot Fix, but yes it's just hot fix. Looking for better solution.