1

I want to create an application having two versions: one for desktop - java standard edition, and one for android. As GUI would be quite simple and huge part of logic would be probably platform independent (only basic Java packages used). I would like of course to share this main core part.

Thus question: How should I construct my project in Eclipse? 3 projects: android, standardEdition, core? Or can I put everything into one project with two different destination platforms and if yes how to do that?

How to learn android and standardEdition project to learn to use shared core project?

4

1 回答 1

0

我会使用 3-project 方法。正如您已经说过的,为核心制作一个单独的项目。(API)

这样,您还可以仅为核心创建单元测试,并且您的设置仍然看起来很干净。您应该添加到“核心”项目的是一个 ant 文件或类似的东西,以便从项目中生成一个 jar 文件,从而可以将您的核心导入其他项目。另一个优点是核心中使用的任何库都只需要在那里导入,因为核心的导入将使用这些库。

于 2013-09-12T13:30:54.040 回答