Eclipse 中的“Android 私有库”文件夹是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20604193/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the "Android Private Libraries" folder in Eclipse?
提问by Monstieur
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".
我最初认为它专门用于像支持库这样的官方库。但是,每当我使用“添加到构建路径”菜单项添加自定义 JAR 时,它都会自动显示在“参考库”和“Android 私有库”中。其中之一是多余的,因为在构建时导出两者都没有意义。此外,“Android 私有库”无法修改,因此我无法(轻松)添加 java 文档或源路径。更不用说在“Android 私有库”中自定义 JAR 似乎是错误的。
I cannot delete the entry from "Android Private Libraries" to use only "Referenced Libraries" either.
我也无法从“Android 私有库”中删除条目以仅使用“参考库”。
采纳答案by Sheraz Ahmad Khilji
In my case i always add libraries to libs folder.
就我而言,我总是将库添加到 libs 文件夹。
According to my understanding thats the way its suppose to be. Android Private Libraryfolder references these jars in libs folder. The Android Private Libraryis used during the creation of apk (probably during the conversion of your java code into dex file).
根据我的理解,这就是它假设的方式。Android Private Library文件夹引用 libs 文件夹中的这些 jar。在Android的私人图书馆的创建APK的(可能是您的Java代码转换成DEX文件时)期间使用。
回答by Sunny
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.
我对自定义 jar 没有任何问题。就我而言,它们仅在参考库中。我建议您查看属性中的Order and Export
选项卡。只需java build path
检查所有自定义 jar 并取消选中所有 Android 特定库。如果您想要参考库中的所有 jar,请检查所有 jar 并清理您的项目。
回答by A King
you just need to put jar and jardoc to a folder but not the folder "libs". Then there will be a 'Reference Library', Then you can add jardoc to jar by properties of jar in Reference Library.
你只需要把 jar 和 jardoc 放到一个文件夹而不是文件夹“libs”。然后会有一个'Reference Library',然后你可以通过参考库中jar的属性将jardoc添加到jar中。
1: New a Folder named sth but not "libs" like folder named 'lib'. 2: Put your .jar and .jardoc in the new folder the folder 'lib' in this tutorial 3: Add the jar and jardoc to project. Then, a 'Reference Libraries' will appear 4: Delete original jar/jardoc.jar in libs (if you've imported them to libs before). 5: add XXXjavadoc.jar to XXX.jar as doc location.
1:新建一个名为 sth 但不是“libs”的文件夹,如名为“lib”的文件夹。2:将您的 .jar 和 .jardoc 放在本教程中的新文件夹“lib”文件夹中 3:将 jar 和 jardoc 添加到项目中。然后,将出现“参考库” 4: Delete original jar/jardoc.jar in libs(如果您之前已将它们导入到库中)。5:将XXXjavadoc.jar添加到XXX.jar作为文档位置。