eclipse “Android 私有库”未出现在项目中
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19909686/
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
"Android Private Libraries" doesn't appear in project
提问by saarraz1
The "Android Private Libraries" item is missing from my project (it doesn't appear in the Project Explorer in Eclipse)... It appears as though it isn't getting built into the project either, as I'm getting various errors regarding jar files in my "libs" folder...
我的项目中缺少“Android 私有库”项目(它没有出现在 Eclipse 的项目资源管理器中)......它似乎也没有被内置到项目中,因为我收到了各种错误关于我的“libs”文件夹中的 jar 文件...
It does appear in Java Build Path (yet it appears to be empty - no jar files appear under it in the Libraries tab), though, and I did make sure it is checked there.
不过,它确实出现在 Java Build Path 中(但它似乎是空的 - 在 Libraries 选项卡中它下面没有出现 jar 文件),而且我确实确保在那里检查了它。
If it is of any relevance, the project at hand has a lot of Android library project dependencies as well, and in those library projects the jar files under libs/ do appear under Android Private Libraries.
如果有任何相关性,手头的项目也有很多 Android 库项目依赖项,在这些库项目中,libs/ 下的 jar 文件确实出现在 Android Private Libraries 下。
回答by saarraz1
I found the problem - I just recently added a new library project as a dependency, and it had an earlier version of android-support-v4.jar in its Android Private Libraries than the one I was using, so that ended up causing the entire Android Private Libraries folder not to be generated in the end project.
我发现了问题 - 我最近刚刚添加了一个新的库项目作为依赖项,它的 Android 私有库中的 android-support-v4.jar 版本比我使用的要早,因此最终导致整个Android Private Libraries 文件夹不会在最终项目中生成。
Found this out by looking at the Android Console after trying to build.
尝试构建后通过查看 Android 控制台发现了这一点。
回答by Jayasagar
May be try the following steps
可以尝试以下步骤
- Check and install Android SDK Build-tools in Android SDK Manager.
Package Explorer -> Right click the project -> Android Tools -> Fix Project Properties
.Project -> Clean
- Check this Libraries do not get added to APK anymore after upgrade to ADT 22
- 在 Android SDK Manager 中检查并安装 Android SDK Build-tools。
Package Explorer -> Right click the project -> Android Tools -> Fix Project Properties
.Project -> Clean
- 检查此库在升级到 ADT 22 后不再添加到 APK
Please update question with eclipse screen shot to get more clarity on problem you face :)
请使用 Eclipse 屏幕截图更新问题,以更清楚地了解您面临的问题:)
回答by Rahul kishan
- check console
- you can find android-support-v4.jar in two paths
- Go to those path manually and replace the android-support-v4.jar with larger size
- 检查控制台
- 你可以在两条路径中找到 android-support-v4.jar
- 手动转到这些路径并用更大的尺寸替换 android-support-v4.jar
thats it!!it works for me:-)
就是这样!!它对我有用:-)
回答by live-love
Remove the oldest jar file from the libs folder and replace it with the same jar file that's being referenced in the other project. If they both have the same version it should work and you should see your Android Private Libraries folder again.
从 libs 文件夹中删除最旧的 jar 文件,并将其替换为另一个项目中引用的相同 jar 文件。如果它们都具有相同的版本,它应该可以工作,您应该再次看到您的 Android Private Libraries 文件夹。
回答by Stevens
this question is duplicated with Libraries do not get added to APK anymore after upgrade to ADT 22
这个问题与图书馆重复,升级到 ADT 22 后不再添加到 APK
Firstly, you may need to check out our "Problems" view in eclipse for any useful information there. In my issue, it said that two versions of android-support-v4.jar were found in workspace. this error prevented the importation of private libraries. Issue was fixed after I removed one of the jar file.
首先,您可能需要在 eclipse 中查看我们的“问题”视图以获取任何有用的信息。在我的问题中,它说在工作区中找到了两个版本的 android-support-v4.jar。此错误阻止了私有库的导入。删除其中一个 jar 文件后问题得到解决。
回答by Ankit Jain
I removed android-support-v4.jar from java build path in properties and it worked for me.
我从属性中的 java 构建路径中删除了 android-support-v4.jar,它对我有用。