There is an application for android and there is a library application for android. The development environment is eclipse.

2 questions:

1) How to include classes from a regular Java project into the library android application? In the folder with the library project, I made a normal link for the java project src folder. Those. I have a src folder where the android library source codes are located and the src_link folder is a link to another project. It is right?

2) How to properly connect the android library to a regular project android project? The fact is that before I used only the classes that I created in the library and used them in several android projects. Now I decided to try adding a resource to the library. For example, created an object style.

Tried to apply this style to the element. The development environment did not see the style from the library. I tried to set this style to an object manually. There were no mistakes, but the style did not apply. No reaction.

What am I wrong?

  • Is the option to replace eclipse with a modern development environment not considered? - anber
  • I hear for the first time that eclipse is not a modern development environment - Konstantin Pl
  • In addition to the fact that eclipse simply inferior in functionality and convenience to Intellij and Android Studio, Google stopped supporting eclipse-adt after the release of Android Studio. This is indicated both on the eclipse-adt download page and on the android-developers blog. - anber

1 answer 1

On 1. To include Java-classes from the "normal" project it is possible having made of them the Android Lybrary-project and having connected in the form of library.

By 2. The library can be connected via project-Properties-> Build Path-> Configure Build Path-> Add External JARs ...
documentation here

  • For starters, the way you write about is not suitable for Android projects. This is how libraries are connected in standard Java projects. Secondly, how to perform refractoring when, when the already compiled library is connected? - Konstantin Pl