在Git / SVN版本控制中使用代号一个项目

在Git / SVN版本控制中使用代号一个项目

问题描述:

我们正在尝试使用git版本控制来处理一个Codename One项目。

We are trying to work on a Codename One project using git version control.

当我从git中提取项目时,文件(已修改和新添加的主题资源文件)进行更新,但它们不会出现在主题中。

When I pull the project from git, the files (modified and newly added theme res files) are updated but they don't appear in the theme.

当我尝试运行该项目,如何刷新该项目时,我的更改没有反映出来?

My changes aren't reflected when I try to run the project, how to refresh the project?

我也尝试构建/清理,刷新cn1lib,但没有取得任何进展。

I tried to build/clean, refresh the cn1lib too but made no progress.

这实际上是由专门设计的功能触发的与版本控制环境中的团队合作。您可以通过在设计器中取消选中文件-> XML团队模式来使其工作,但是可以解决此功能: http://www.codenameone.com/blog/teamwork-and-other-things.html

This is actually triggered by a feature specifically designed for working with a team in version controlled environments. You can get this to work by unchecking File->XML Team Mode in the designer but that would "work around" this feature: http://www.codenameone.com/blog/teamwork-and-other-things.html

解决方案是检入 res 目录,如果存在,则打开res文件是指该目录,而不是主题文件。这样一来,您的团队就可以一起编辑该目录,避免共享二进制res文件时发生冲突。

The solution would be to checkin the res directory, when it exists opening the res file refers to that instead of to the theme file. This allows your team to edit that directory together and avoid conflicts that will arise when sharing the binary res file.