简体   繁体   English

无法在Eclipse中运行Android应用; 错误是缺少库“ appcompat_v7”和“ android-support-v4.jar”。 似乎无法添加这些库

[英]Cant run Android app in eclipse; error is that library 'appcompat_v7' and 'android-support-v4.jar' missing. Cant seem to add these libraries however

I'm trying to run an android app that was working fine on another computer, but now I am getting an error when I import it. 我正在尝试在另一台计算机上运行正常的android应用,但是现在导入时出现错误 Its telling me that these two libraries are missing: 它告诉我这两个库丢失了:

appcompat_v7\libs\android-support-v4.jar
""\""\android-support-v7-appcompat.jar

I've looked at a lot of other fixes for this error online but it wont work for me. 我已经在线查看了很多其他修复此错误的方法,但对我而言不起作用。 When I go right click and go to package properties, it wont allow me to import thee libraries, they're not there. 当我右键单击并转到包属性时,它不允许我导入您的库,因为它们不在那里。 Also when I right click>android>add support libraries, and after it finished, still same error. 另外,当我右键click>android>add支持库时,完成后仍会出现同样的错误。 I am 99% sure I have android SDK installed correctly. 我99%肯定我已正确安装android SDK。 What else could be causing this? 还有什么可能导致这种情况?

Here's the project.properties 这是project.properties

#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project‌​.txt 
# Project target. 
target=android-21 
android.library=false 
android.library.reference.1=../../workspace/appcompat_v7

控制台中错误的屏幕截图

Thanks 谢谢

Okay, I feel like I know what your problem is: 好吧,我觉得我知道您的问题是:

On your other 1st-computer, this project was referencing libraries from another project-library, one that existed in the directory: /workspace/appcompat_v7/ 在另一台第一台计算机上,该项目正在引用另一个项目库中的库,该库位于以下目录中:/ workspace / appcompat_v7 /

When you copied that project over to a different 2nd-computer and imported it, you forgot to also include that other project-library, but this project is still trying to reference a library that doesn't exist here. 当您将该项目复制到另一台第二台计算机并导入时,您忘记了也包含该其他项目库,但是该项目仍在尝试引用此处不存在的库。

You need to copy over the project-library /workspace/appcompat_v7/ over to your 2nd-computer, then double check / update the library location to match. 您需要将项目库/ workspace / appcompat_v7 /复制到第二台计算机,然后仔细检查/更新库位置以匹配。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM