Android and Blackberry project in eclipse

I am new to android and really used eclipse for some kind of basic Blackberry work, so I was curious if I can choose some experts for any suggestions / pointers to setting up the workspace / project that you use for dual platform project support in eclipse?

I found that about 80% of my code is distributed between Blackberry and Android, so I need it 20%.

My real thinking is to have one workspace with a common source in several projects, setting them in the settings of the source tree.

In cases where specific platform functions are used, I will indicate the source name as * Android _ ??? * and * Blackberry _ ??? * respectively, and have a common class that both projects point to.

those. in fact, in the same workspace there is both Android and Blackberry, and in the workspace there is one project for Blackberry and one for Android, but each project uses the same file system with the corresponding platform source files excluded from the assembly.

If only a simple way to make an equivalent #ifdefin java would simplify this port, but I think we need to do this without it. (I heard about using the ac preprocessor for this, but it sounds messy, I highly recommend not accepting this)

I heard about creating a shared library, but I feel that they are not compatible between Android and BlackBerry, so any advice on this approach is also welcome.

+3
source share
2 answers

It may be too late, but I will tell you about it anyway.

I have the same need. I have common code for both Blackberry and Android. I have three separate Eclipse projects for each part. "Concrete" projects are those that are actually being implemented, and both of them have a project dependency (which I find cleaner than including a source) in Common.

Please note: the overall project should be a Blackberry project (created using the plugin), since the Blackberry project cannot depend on a project other than Blackberry.

This works well for me!

+1

, , , , 3

Android

Common, , , Blackberry/Android .

. MyClass, , MyClassCommon , Blackberry MyClass MyClassCommon Android.

Eclipse , Blackberry, Android src- (trunk), Common, Blackberry, Android 3 src.

, , , , .

, / , .

+1

All Articles