在Eclipse中的错误与appcompat_v7错误、Eclipse

2023-09-12 10:17:31 作者:做最好的自己

作为新的Andr​​oid developent我跟着最简单的教程,建立一个新的Andr​​oid项目,并接受所有默认(内置它奇巧)。令我失望,我有一个未计划项目 - appcompat_v7,随着错误:

Being new to Android developent I followed the simplest of tutorials, built a new android project, accepting all default (built it for kitkat). To my dismay I have an un planned project - appcompat_v7, along with the errors:

容器Android的依赖关系引用不存在的库'C:\用户\工作区\ appcompat_v7 \ BIN \ appcompat_v7.jar

The container 'Android Dependencies' references non existing library 'C:\Users...\workspace\appcompat_v7\bin\appcompat_v7.jar'

和两倍以下

该项目不能建到构建路径错误已解决

The project cannot be built until build path errors are resolved

有没有一种快速的方法来解决这些? 这是多么困难的标志,而窃听与不愉快的意外学习Android的将是?

Is there a quick way to fix these? Is this a sign of how difficult, and bugged with unpleasant surprises learning Android is going to be?

(希望不会是类似学习IOS 6年前...)

(Hope it will not be similar to learning IOS 6 years ago...)

推荐答案

诀窍是,你需要清洁和放大器;建 appcompat_v7 的项目。到

The trick is, you need to clean & build the appcompat_v7 project. Go to

Project -> select Clean -> select the project. 

如果该项目没有自动建立,右键单击在包项目探索和选择生成项目。现在的.jar 文件将在项目的文件夹中生成。在此之后,清洁和放大器;构建引用 appcompat_v7

If the project is not built automatically, right click on the project in the package explore and select Build Project. Now the .jar file will be generated in the project's bin folder. After that, clean & build all projects that reference appcompat_v7.

还要注意的是:

您必须有 SDK工具 / 生成工具最新版本 / 平台工具。如果你尝试这一点,它不工作,然后去 Android的SDK管理器,并确保你有最新版本 需要的工具。 在情况下,你的项目只需要API级别14(冰淇淋三明治) &放大器;以上,选择API级别14中的最低要求的SDK 当你创建一个新的工程项目向导。现在appcompat_v7 库将不需要为这个项目,并且应用程序 将使用这是present在AOSP建立本机动作条类 从ICS起。 You must have the latest versions of SDK Tools / Build Tools / Platform Tools. If you try this and it doesn't work, then go to the Android SDK Manager and make sure you have the latest versions of the required tools. In case your project only requires API level 14 (Ice Cream Sandwich) & above, select API level 14 for "minimum required SDK" in the project wizard when you create a new project. Now the appcompat_v7 library will not be required for this project, and the application will use the native ActionBar class which is present in AOSP builds from ICS onwards.