Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android import external classes into eclipse

I've seen many ways to import my own classes to a project, but they all just say "do this, do that" and there's no explanation of how the thing actually works. I'm used to iPhone development and there i just link the classes from an external folder to the project and i can modify them in the IDE or externally - they will still be linked (that is they are not copied to the project during development, they're merely links to actual files). I was wondering if such a thing is possible on eclipse? Ideally when i add another class to the folder, it should also appear in eclipse if possible.

  • i link the external class (without making any copies of it)
  • i modify the class, it gets modified for all projects using it
  • on build, eclipse automatically includes the file as well

Thanks

like image 647
Marius Avatar asked Mar 24 '26 11:03

Marius


2 Answers

Android library projects is the answer you're looking for. You'll find a good documentation for it here: Setting up a Library Project

like image 50
Juhani Avatar answered Mar 26 '26 01:03

Juhani


Sounds like you should set up an Android Library Project. Once you've done this, you can add references to the library project to as many applications as you need.

like image 32
dbyrne Avatar answered Mar 26 '26 01:03

dbyrne



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!