What is the "Android Private Libraries" folder in Eclipse?
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.
Related videos on Youtube
![Monstieur](https://i.stack.imgur.com/6T1Bg.jpg?s=256&g=1)
Monstieur
Updated on May 29, 2020Comments
-
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.
-
aleung over 10 yearsTo add javadoc and source path to JAR files in /libs directory, please refer to this answer: stackoverflow.com/a/13963000/94148
-
-
Monstieur over 10 yearsThe 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 over 10 yearsAre you saying that all jars you pasted in libs folder appear in Android Private Libraries?
-
Monstieur over 10 yearsYes. 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 over 10 yearsSo 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 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 over 10 yearsIn my case not all jars are there in Android Private Libraries only
google-play-service.jar
andandroid-support-v4.jar
appears. All others jars are only inReference Libraries
. -
ajarmani over 10 yearsIt 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 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?