Android的:在2011年中期SDK和ADT插件更新后的风格参考 [英] android:style reference after SDK and ADT plugin update in mid 2011
问题描述
我看到很多类似的问题的 R.java无法编译,没有发现资源匹配@android:风格/ 的 刚过SDK&放大器; ADT更新 的导致现有项目不能编译
该R.java文件不能被编译。我发现来自引用错误
<样式名称=Theme.Wallpaper父=机器人:风格/ Theme.Wallpaper>
<项目名称=机器人:colorForeground>#FFF< /项目>
< /风格>
正在发生的事情是,一些款式,像Theme.Wallpaper不公开。你不应该向他们伸出了。
有人建议恢复到platform_tools_r05
<一href=\"http://groups.google.com/group/android-developers/browse_thread/thread/550fce9670530d9b/9b2b2aa389dce367?show_docid=9b2b2aa389dce367&pli=1\" rel=\"nofollow\">http://groups.google.com/group/android-developers/browse_thread/thread/550fce9670530d9b/9b2b2aa389dce367?show_docid=9b2b2aa389dce367&pli=1
如果你想要做的正确方法
读泽维尔7月28日
<一href=\"http://groups.google.com/group/android-developers/browse_thread/thread/550fce9670530d9b/9b2b2aa389dce367?show_docid=9b2b2aa389dce367&pli=1\" rel=\"nofollow\">http://groups.google.com/group/android-developers/browse_thread/thread/550fce9670530d9b/9b2b2aa389dce367?show_docid=9b2b2aa389dce367&pli=1
如果你想重用的风格,是私有的,你应该复制
这种样式的内容到你自己,而不是扩展它。
块引用>好了,所以我在哪里可以找到(私人)风格的内容?
严重的是,更新后我没有时间来纠正错误平台项目时code的工作权利。解决方案其中p - !对于想拥有用户的Windows默认主题精选
壁纸出现在他们身后。 - &GT;
&LT;样式名称=Theme.Wallpaper&GT;
&LT;项目名称=机器人:windowBackground&GT; @android:彩色/透明&LT; /项目&GT;
&LT;项目名称=机器人:colorBackgroundCacheHint&GT; @空&LT; /项目&GT;
&LT;项目名称=机器人:windowShowWallpaper&GT;真&LT; /项目&GT;
&LT; /风格&GT;看起来像要使用从<一个以上code href=\"https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/themes.xml\"相对=nofollow> Android源,并创建自己的主题基础吧。
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.
解决方案<!-- 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.
这篇关于Android的:在2011年中期SDK和ADT插件更新后的风格参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!