简体   繁体   English

无法在Eclipse中将Android Facebook Connect项目添加到SVN

[英]Cannot add android facebook connect project to svn in eclipse

I am creating an android application which connects to facebook using the official facebook connect sdk via the methods given here . 我正在创建一个Android应用程序,该应用程序通过此处指定的方法使用官方facebook connect sdk连接到facebook。 I am using eclipse on my iMac. 我在iMac上使用eclipse。 I am successfully able to connect my app with facebook, post to wall etc, ie programming part is working smoothly. 我能够成功地将我的应用程序与Facebook连接,发布到墙上等,即编程部分工作正常。

To connect official SDK to an android project, we first have to create one project (say facebook project) for facebook connect and include src folders coming up with the facebook SDK. 要将官方SDK连接到android项目,我们首先必须为facebook connect创建一个项目(例如facebook项目),并包括facebook SDK附带的src文件夹。 Then my actual android project reference this facebook project so that it can use SDK functions (see the link). 然后我实际的android项目引用了这个facebook项目,以便它可以使用SDK函数(请参阅链接)。

Now my problem is that I am using SVN to synchronize the project with my co-workers. 现在我的问题是我正在使用SVN将项目与我的同事同步。 When I commit my project It successfully get commited. 当我提交项目时,它会成功提交。 But when my friends checkout they get compile error as they do not have the facebook project in their workspace. 但是,当我的朋友结帐时,由于工作空间中没有facebook项目,他们会收到编译错误。 Is there any method to package this facebook project with my android project and upload it to svn via a single commit. 有没有什么方法可以将这个Facebook项目与我的android项目打包在一起,并通过一次提交将其上传到svn。 There isn't any "add to project" kind of tick or switch when I reference the facebook project from my project. 当我从我的项目中引用Facebook项目时,没有任何“添加到项目”的标记或切换。 I hope my question is clear to you.. 希望您能清楚我的问题。

The approach I've used for this is to create a stand-alone svn path for the facebook SDK, and then use svn:externals to import the facebook SDK into a subdirectory of the client project. 我为此使用的方法是为facebook SDK创建一个独立的svn路径,然后使用svn:externals将facebook SDK导入到客户端项目的子目录中。

I'm using ant builds most of the time, so can't give you IDE instructions, however you should be OK if you use svn:externals to import facebook SDK into a subdir, then make that subdir a dependency. 我大部分时间都在使用ant builds,因此无法向您提供IDE指导,但是如果您使用svn:externals将facebook SDK导入子目录,然后将该子目录作为依赖项,则应该没问题。

I do this by setting the android.library.reference.n property (in default.properties) to point to the subdir 我通过将android.library.reference.n属性(在default.properties中)设置为指向子目录来完成此操作

Hope this helps, 希望这可以帮助,

Phil Lello 菲尔·莱洛

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

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