Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Android: how to use a library project with linked folders?

If I have simple android library (set with project->properties->android->Library) with linked folders, the linked folders are not included in the application using the library.
Choosing a library project will add a link in the application project to the library's 'src' folder and all real folders, but it will ignore any linked folders in the Library project.

---Edit: this actually works with more recent Eclipse and adt---
I can add the library as a project dependency (project->properties->javabuildpath->project) - this will make Eclipse aware of the classes in the linked folders, and fix the compile errors in Eclipse, but will not include the library classes in the apk itself and the app will fail with java.lang.NoClassDefFoundError.

What is your suggestion on using a library project with source folders linked in from outside of the library project's main folder?

like image 689
misiu_mp Avatar asked Feb 01 '26 20:02

misiu_mp


1 Answers

The solution was under my nose all the time:

Apparently with a more recent version of eclipse and/or android tools it is enough to add the library as a project dependency project -> properties -> javabuildpath -> project.

No need to use the android library setting at all project -> properties -> android.

I am now using eclipse Helios (3.6) with Android tools 10.0.1, and it works in this combination.

like image 172
misiu_mp Avatar answered Feb 04 '26 10:02

misiu_mp



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!