简体   繁体   English

如何将Android应用程序项目合并到Java项目中-Eclipse

[英]How to incorporate an Android Application Project onto a Java Project - Eclipse

I am a beginner with Java and Eclipse. 我是Java和Eclipse的初学者。 I am trying to create an automated framework with both Selenium (Web application) and Robotium (Android Application). 我正在尝试使用Selenium(Web应用程序)和Robotium(Android应用程序)创建一个自动化框架。 I have both project completed, one is a Java Project (Selenium) that uses the JDK compiler to run Junit test cases, and the other one is an Android Test Project that uses the Android Compiler to run android test cases. 我已经完成了两个项目,一个是使用JDK编译器运行Junit测试用例的Java项目(Selenium),另一个是使用Android编译器运行android测试用例的Android测试项目。

My questions is: is there a way to combine an Android project onto a Java project? 我的问题是:是否可以将Android项目组合到Java项目中?

I have tried adding the essential files/changes of an android project onto the java project but when I run each test it fails because it uses different compilers. 我尝试将android项目的基本文件/更改添加到java项目中,但是当我运行每个测试时,它失败了,因为它使用了不同的编译器。

Is there a way around this? 有没有解决的办法? I am open to any suggestions. 我愿意接受任何建议。

Thank you in advanced! 谢谢高级!

After reading your comment I believe i can say that you should keep them separate. 阅读您的评论后,我相信我可以说您应该将它们分开。 If you want to share some functionality between them all (I cannot imagine you could share all that much between all 3, between android and selenium maybe as they are at least in the same language) then you can create another project and use this as a shared source folder between the two. 如果您想在两者之间共享某些功能(我无法想象,您可以在android和selenium之间共享所有3种内容,也许它们至少是同一语言),那么您可以创建另一个项目并将其用作两者之间共享源文件夹。 You will find having them separate makes a lot more sense. 您会发现将它们分开会更有意义。 The most glaring example is with version controlling your tests, you will find you will want to make tags when you release the actual application, with a single project you will be tagging your individual project for any release of any of the three applications when they will not reflect the actual state of release. 最明显的例子是控制测试的版本,您会发现在发布实际应用程序时希望创建标签,对于单个项目,您将为三个项目中的任何一个的任何版本标记您的个人项目。无法反映发布的实际状态。 That hopefully makes sense. 希望这是有道理的。 I am pretty tired. 我好累

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

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