android:2011年中SDK和ADT插件更新后的样式参考

发布于 2024-12-02 10:38:38 字数 1243 浏览 6 评论 0原文

我看到很多类似的问题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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你的往事 2024-12-09 10:38:38
<!-- Default theme for windows that want to have the user's selected
     wallpaper appear behind them.  -->
<style name="Theme.Wallpaper">
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:colorBackgroundCacheHint">@null</item>
    <item name="android:windowShowWallpaper">true</item>
</style>

看起来您想使用 中的上述代码Android 源代码并基于它创建您自己的主题。

<!-- Default theme for windows that want to have the user's selected
     wallpaper appear behind them.  -->
<style name="Theme.Wallpaper">
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:colorBackgroundCacheHint">@null</item>
    <item name="android:windowShowWallpaper">true</item>
</style>

Looks like you want to use the above code from the Android source and create your own theme based it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文