android:2011年中SDK和ADT插件更新后的样式参考
我看到很多类似的问题R.java无法编译,找不到与@android:style/匹配的资源“刚刚在SDK和ADT更新之后” >导致现有项目无法编译 无法编译 R.java 文件。我发现错误来自于引用
<style name="Theme.Wallpaper" parent="android:style/Theme.Wallpaper" >
<item name="android:colorForeground">#fff</item>
</style>
发生的情况是某些样式(例如 Theme.Wallpaper)不是公开的。你不应该再从他们那里伸出援手。
有些建议恢复到 platform_tools_r05 http://groups.google.com/group/android-developers/browse_thread/thread/550fce9670530d9b/9b2b2aa389dce367?show_docid=9b2b2aa389dce367&pli=1
如果你想采取正确的方式 阅读 Xavier 7 月 28 日 http://groups.google.com/group/android-developers/browse_thread/thread/550fce9670530d9b/9b2b2aa389dce367?show_docid=9b2b2aa389dce367&pli=1
如果您想重复使用私有样式,您应该复制 将该风格的内容融入您自己的风格中,而不是对其进行扩展。
好的,那么我在哪里可以找到(私人)样式的内容? 说真的,更新后,当项目代码正常工作时,我没有时间纠正平台错误。
I see a lot a similar questions R.java can't compile , No resource found that matches @android:style/ "just after SDK & ADT update" leading to existing projects can't compile
The R.java file cannot be compiled. I find out the errors come from referencing
<style name="Theme.Wallpaper" parent="android:style/Theme.Wallpaper" >
<item name="android:colorForeground">#fff</item>
</style>
What is happening is that some styles, like Theme.Wallpaper are not public. You should not extend from them anymore.
Some suggest to revert to platform_tools_r05
http://groups.google.com/group/android-developers/browse_thread/thread/550fce9670530d9b/9b2b2aa389dce367?show_docid=9b2b2aa389dce367&pli=1
If you want to do the correct way
read Xavier July 28
http://groups.google.com/group/android-developers/browse_thread/thread/550fce9670530d9b/9b2b2aa389dce367?show_docid=9b2b2aa389dce367&pli=1
If you wish to reuse a style that is private, you should copy the
content of that style into your own instead of extending it.
Ok so Where do I find the content of the (private) style ?
Seriously, after an update I don't have time to correct platform mistakes when the project code worked right.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您想使用 中的上述代码Android 源代码并基于它创建您自己的主题。
Looks like you want to use the above code from the Android source and create your own theme based it.