How to reference an external jar in an Android Library project in Eclipse

后端 未结 3 570
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-13 17:40

Oh Android. How I love your verbiage.

I have a workspace with a few projects in it. App1 and App2 are Android applications. Common is an Android library project. App1 an

3条回答
  •  情话喂你
    2021-02-13 18:04

    To augment omermuhammed's reply, if the common project is not one that is being changed frequently, creating a jar and using it in the other projects is a good solution.

    To create a jar right-click the project on Eclipse -> Export -> Java -> JAR file, then select the folders you want to include in the JAR, in your case I guess this includes the folders gen and libs (libs being the folder with the httpmime & apache-mime4j JARS), but probably neither res nor the root directory of your project (with files such as AndroidManifest.xml that will cause problems with the same file in the dependent projects).

提交回复
热议问题