【发布时间】:2014-05-25 15:15:39
【问题描述】:
我从Android repository 下载了一个应用程序(日历)。
我试图编译它,但它给了我错误。
作为一名开发人员,我学到的关于存储库的第一条规则是:
提交你的代码,如果它可以无错误地编译。
编译时出现以下错误:
Error:(38, -1) android-apt-compiler: [Calendar] C:\Dev\Calendar\res\layout\location_dropdown_item.xml:38: error: Error: No resource found that matches the given name (at 'textColor' with value '@drawable/list_item_font_primary').
Error:(46, -1) android-apt-compiler: [Calendar] C:\Dev\Calendar\res\layout\location_dropdown_item.xml:46: error: Error: No resource found that matches the given name (at 'textColor' with value '@drawable/list_item_font_secondary').
Error:(44, -1) android-apt-compiler: [Calendar] C:\Dev\Calendar\res\layout\recurrencepicker.xml:44: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').
确实,drawable 包中缺少提到的 xml 文件。你怎么看:这个提交被检查了吗?
我应该用什么来代替那些drawable?颜色:黑色?还是红色?解决此问题的最佳方法是什么?
如果 Google 不遵守标准,谁会遵守?
【问题讨论】:
-
这种困境可能是部分结帐的结果。当我通过本地 svn 服务器检查我的项目时,我的本地库总是丢失。
-
在网站上,它只显示了这个 Git 链接,没有提到额外的依赖:git clone android.googlesource.com/platform/packages/apps/Calendar
-
您是否按照文档说明构建了整个源代码树?
-
整个源代码树是什么意思?我从那个 Git 链接导入了整个包。而且我找不到任何文档,它只是简单的源代码。