What is the "Android Private Libraries" folder in Eclipse?

23,494

Solution 1

In my case i always add libraries to libs folder.

According to my understanding thats the way its suppose to be. Android Private Library folder references these jars in libs folder. The Android Private Library is used during the creation of apk (probably during the conversion of your java code into dex file).

Solution 2

I don't have any problem with custom jars. They are only in Reference Libraries in my case. I suggest you to look at Order and Export tab in java build path properties.Just check all the custom jars and uncheck all the Android specific libraries. If you want all jars in Reference Libraries then check all jars and clean your project.

enter image description here

Share:
23,494

Related videos on Youtube

Monstieur
Author by

Monstieur

Updated on May 29, 2020

Comments

  • Monstieur
    Monstieur about 4 years

    I initially thought it was exclusively for official libraries like the support library. However any time I add a custom JAR using the "Add to build path" menu item, it automatically shows up in both "Referenced Libraries" and "Android Private Libraries". One of these is redundant since there is no point in exporting both at build time. Additionally, "Android Private Libraries" cannot be modified so I can't (easily) add java doc or source paths. Not to mention it just seems wrong that a custom JAR is in "Android Private Libraries".

    I cannot delete the entry from "Android Private Libraries" to use only "Referenced Libraries" either.

  • Monstieur
    Monstieur over 10 years
    The JAR shows up in Android Private Libraries as soon as I paste it in the "libs" folder. It cannot be deleted or unchecked from "Android Private Libraries". It additionally shows up under "Referenced Libraries" and even if I remove this from the build path the library is still usable in code since it's in "Android Private Libraries".
  • Sunny
    Sunny over 10 years
    Are you saying that all jars you pasted in libs folder appear in Android Private Libraries?
  • Monstieur
    Monstieur over 10 years
    Yes. As soon as I paste it gets added there. It's directly usable from my code after that. To make it show up in "Referenced Libraries" I need to manually click "Add to build path" as usual for Java, but this seems redundant now.
  • Monstieur
    Monstieur over 10 years
    So manually adding JARs to the build path is no longer required now? As soon as I paste a JAR in the "libs" folder it is automatically referencable from code because it shows up in "Android Private Libraries" (which is in the build path).
  • Sheraz Ahmad Khilji
    Sheraz Ahmad Khilji over 10 years
    @Kurian Yes that's correct after you add the jar in libs. You don't need to reference them manually. After adding jars in libs they are automatically reference able and You should also check the Android Private Libraries folder and that's it. Check this answer for more help stackoverflow.com/a/16642869/1118886
  • Sunny
    Sunny over 10 years
    In my case not all jars are there in Android Private Libraries only google-play-service.jar and android-support-v4.jar appears. All others jars are only in Reference Libraries.
  • ajarmani
    ajarmani over 10 years
    It really helped me a lot after googling for a long time.Yea if you add jar files to libs folder,it gets automatically included in android private libraries.
  • Pacerier
    Pacerier over 9 years
    @SherazAhmadKhilji, Doesn't answer the question. Do you mean that "Referenced Libraries" aren't included in the apk? If both "Referenced Libraries" and "Private Library" are included in the apk, then what's the difference?