Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse "\Android Private Libraries" vs "\Referenced Libraries"

I've noticed that some libraries need to be added to build path manually (i.e. "Referenced Libraries") whereas other libraries works fine if I simply put the jar in \libs folder (i.e. "Android Private Libraries").

For example android support library works fine if it is manually added to the build path, But what is the reason?

I haven't understood what is the difference and when I should choose one option over the other and vice-versa.

like image 506
AndreaF Avatar asked Nov 02 '22 09:11

AndreaF


1 Answers

Android Libraries contains

  1. Classes and/or Java codes
  2. Jar Files, and
  3. Resources

They are also a project. They cannot be run directly, but compiled. Private Libraries doesn't have resources, they are jar files that contains .class files

For example android support library works fine if is added to build path... but what is the reason?

Specifically, there are useful classes introduced in Honeycomb and above like Fragment. You might want to use Fragment for Gingerbread? Use android support library.

like image 97
Glenn Avatar answered Nov 15 '22 04:11

Glenn