简体   繁体   English

通过SVN分享Android + Eclipse项目?

[英]Android+Eclipse project sharing via SVN?

I am very new to Eclipse (Galileo, Eclipse IDE for Java Developers) and working on my first Android app, but have used SVN on many other kinds of projects and development. 我是Eclipse(Galileo,面向Java开发人员的Eclipse IDE)的新手,并且正在开发我的第一个Android应用程序,但在许多其他类型的项目和开发中使用了SVN。 Last night I took my first crack at pushing the new source into a shared repository (at work) and then pulling it back down at home. 昨晚我第一次尝试将新的源码推入共享存储库(在工作中),然后在家中将其拉回来。

Based on an SO question/answer, I had ignored the bin and gen folders, but added everything else. 基于SO问题/答案,我忽略了bingen文件夹,但添加了其他所有内容。 When I got home, I had hoped it would be as easy as pointing eclipse to the newly downloaded source tree. 当我回到家时,我曾希望它会像将eclipse指向新下载的源树一样容易。

I tried setting the workspace (requested when eclipse started) to the precise folder holding all source. 我尝试将工作空间(在eclipse启动时请求)设置为包含所有源的精确文件夹。 Nothing showed up. 什么都没有出现。 It was as if I were starting fresh regardless of all the source and files sitting in the workspace folder. 无论坐在工作区文件夹中的所有源和文件是什么,都好像我开始新鲜。

Then I thought maybe I needed to open a "project" file to get things rolling. 然后我想也许我需要打开一个“项目”文件来推动事情的发展。 Opening the .project file yielded the contents of that file in the XML editor of eclipse. 打开.project文件会在eclipse的XML编辑器中生成该文件的内容。

What am I missing here? 我在这里错过了什么? Is the project metadata not stored in the source tree? 项目元数据是否未存储在源树中? Do I have to build project metadata up on every machine that gets a working copy of the source? 我是否必须在获取源的工作副本的每台计算机上构建项目元数据? Is this something wrong with my home Eclipse install? 我的家庭Eclipse安装有问题吗? Can someone give me an overview of how they (successfully) do this? 有人能给我一个他们(成功)如何做到这一点的概述吗?

You should be able to do it like you tried. 你应该能够像你尝试过的那样去做。 Make sure you have the Android Development Tools (android eclipse plugin) installed along with the android SDK and make sure you set up ADT before you open the project. 确保安装Android开发工具(android eclipse插件)以及android SDK,并确保在打开项目之前设置ADT。

Not checking in the bin directory makes sense to me, but I do check in the gen folder and don't have any problems. 不检查bin目录对我来说很有意义,但我确实检查了gen文件夹并且没有任何问题。

Here is what I do to open a project from SVN if the source is already on the machine: 以下是我从SVN打开项目的方法,如果源已经在机器上:

  1. Open eclipse 打开日食
  2. Click on File->Import 单击文件 - >导入
  3. Select General->Existing Projects into Workspace 选择General-> Existing Projects into Workspace

Or you can also do this: 或者您也可以这样做:

  1. Open Eclipse 打开Eclipse
  2. File -> Import 文件 - >导入
  3. Select SVN -> Checkout Projects from SVN 从SVN中选择SVN - > Checkout Projects
  4. Follow the steps to get from SVN 按照步骤从SVN获取

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM