Android Test Project Directory Structure When Using Eclipse

前端 未结 2 543
失恋的感觉
失恋的感觉 2021-02-07 11:46

Once upon a time, I avoided Eclipse for Android development. And life was good.

Along the way, I adopted a convention originally supported by the Android command-line bu

相关标签:
2条回答
  • 2021-02-07 12:30
    1. Depends on your toolset:
      ADT >= v12 currently has flaky support for "a project within a project":
      Creating an Android Test project in Eclipse

    2. I have tried separate testproject, and separate test directory, but afaik "a project within a project" approach seems to be the way of the future.
      This is becuase AndroidManifest.xml merging into the test project AndroidManifest.xml, is in the pipeline for the next ADT releases.

    0 讨论(0)
  • 2021-02-07 12:38

    I've been creating test projects with Eclipse 3.6.2 inside my main project just like you describe for command line tools (MyProject and MyProject/test are Android projects that both contain a src folder). You can create this test project using the New Android Test Project by deselecting "Default Location" and setting the path.

    None of my projects are very large, but the only problem I've had so far is that you cannot use the MyProject/test folder under the MyProject project. To be able to right click and run as a test case, you have to access files directly from the MyProjectTest project. To prevent you from having problems, you can add a Resource Filter to hide the test folder in Project Properties > Resource > Resource Filters.

    However, preliminary research suggests that Eclipse does not support sub-projects (i.e., one Eclipse project having another Eclipse project in a subdirectory).

    What problems have you seen?

    0 讨论(0)
提交回复
热议问题