Reputation: 419
I am going to use one class in several Android projects. After importing namespace of the class the second app became being installed with the parent app. Is there a way to prevent such behavior? How should I set up projects in Eclipse?
Upvotes: 0
Views: 53
Reputation: 419
So the complete answer is the following:
1) The class should be put to a separete project which should be marked as a Library Project.
2) To use the class in other projects the created library should be choosed in Properties -> Android
as described here: http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject
Upvotes: 0
Reputation: 82543
Move all the code you need in multiple apps into a separate project, and mark it as a Library Project by right clicking on the project, going to Properties -> Android
and checking the Is Library
option.
Then simply include it as a Library in your other projects.
Upvotes: 1