Friday, 26 November 2010

Eclipse + Subversion = Running Android in any S.O.

As I state in the previous post about running Peersim in any O.S., the bin and .classpath file should be avoid to add in the subversion server.

These are the steps to run android project in any O.S.:

1. Download the project (without .classpath file) from the repository. For example, sampleAndroid
2. Create a new android project in eclipse. For example, tmp
3. Go to the directory of project tmp, copy the .classpath file to the sampleAndroid project folder.
4. Open eclipse.
5. Select file -> import
6. Select General -> Existing projects into workspace
7. Select the directory where your project is
8. Press on Finish.
9. Select the project. Go to Project -> clean...
10. Select Clean projects selected below and select your project*

Now you should be able to run your android project in any O.S.

*Note:  If the folder "gen" is not included in the svn database, when you clear it, it will shows the error telling that it cannot open R.java file. I am using the Android SDK reversion 10, which automatically generates the "gen" folder. So, in this case, just wait a while then the folder will be generated.
This problem can be easily solved if between the step 3 and 4 you create an empty "gen" folder.

**When you are committing, if you see this error:
"Directory 'gen/.svn' containing working copy admin area is missing", you can do the follow:
1. Remove the gen directory
2. Do update.

No comments:

Post a Comment