Adding Android library project to Eclipse build path?

前端 未结 1 854
遥遥无期
遥遥无期 2021-01-14 23:06

I have a multi module Android Maven project which consists of several projects and an Android library project (baselib) where I run non Android based JUnit tests.

<

相关标签:
1条回答
  • 2021-01-14 23:09

    Since the library projects are in the same workspace, we can reference the project directly. Open the preferences for your project and click on the "Android" section.

    enter image description here

    Now, you will see a window for referencing library projects. enter image description here

    Click the "Add..." button, select the projects you want, click "OK", and hit "Apply". Only projects that are marked as libraries can be selected and referenced in this manner. If your projects are not appearing, open their preferences and mark the "Is Library" box in this window of their preferences.

    Your project will now reference these libraries, including any changes you make to them. This is better than using a jar if your libraries will be subject to change. Otherwise, you would have to remove and re-add the jar every time you make a change.

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