找不到Android库项目类错误

找不到Android库项目类错误,android,Android,我有一个Android项目,想添加一个第三方库项目。库项目已在属性中选中“是库”。我在我的主项目中添加了库,方法是转到properties->Android,然后添加库。我查看了许多stackoverflow帖子,这些帖子表明这是添加库项目的正确方法。我仍然收到一个类定义未找到错误,并且不确定原因。您是否遵循了google文档中给出的确切步骤? 跟在这里 我在此引述所需的步骤 基于支持库代码创建库项目: Make sure you have downloaded the Android Su

我有一个Android项目,想添加一个第三方库项目。库项目已在属性中选中“是库”。我在我的主项目中添加了库,方法是转到properties->Android,然后添加库。我查看了许多stackoverflow帖子,这些帖子表明这是添加库项目的正确方法。我仍然收到一个类定义未找到错误,并且不确定原因。

您是否遵循了google文档中给出的确切步骤? 跟在这里

我在此引述所需的步骤 基于支持库代码创建库项目:

  Make sure you have downloaded the Android Support Library using the SDK Manager.
    Create a library project and ensure the required JAR files are included in the project's build path:
        Select File > Import.
        Select Existing Android Code Into Workspace and click Next.
        Browse to the SDK installation directory and then to the Support Library folder. For example, if you are adding the appcompat project, browse to <sdk>/extras/android/support/v7/appcompat/.
        Click Finish to import the project. For the v7 appcompat project, you should now see a new project titled android-support-v7-appcompat.
        In the new library project, expand the libs/ folder, right-click each .jar file and select Build Path > Add to Build Path. For example, when creating the the v7 appcompat project, add both the android-support-v4.jar and android-support-v7-appcompat.jar files to the build path.
        Right-click the project and select Build Path > Configure Build Path.
        In the Order and Export tab, check the .jar files you just added to the build path, so they are available to projects that depend on this library project. For example, the appcompat project requires you to export both the android-support-v4.jar and android-support-v7-appcompat.jar files.
        Uncheck Android Dependencies.
        Click OK to complete the changes.
确保您已使用SDK管理器下载了Android支持库。
创建库项目并确保项目的构建路径中包含所需的JAR文件:
选择文件>导入。
在工作区中选择现有的Android代码,然后单击下一步。
浏览到SDK安装目录,然后浏览到Support Library文件夹。例如,如果要添加appcompat项目,请浏览到/extras/android/support/v7/appcompat/。
单击“完成”导入项目。对于v7 appcompat项目,您现在应该看到一个名为android-support-v7-appcompat的新项目。
在NewLibrary项目中,展开libs/文件夹,右键单击每个.jar文件,然后选择BuildPath>AddtoBuildPath。例如,在创建v7 appcompat项目时,将android-support-v4.jar和android-support-v7-appcompat.jar文件添加到构建路径。
右键单击项目并选择生成路径>配置生成路径。
在Order and Export选项卡中,检查刚刚添加到构建路径的.jar文件,以便它们可用于依赖于此库项目的项目。例如,appcompat项目要求您导出android-support-v4.jar和android-support-v7-appcompat.jar文件。
取消选中Android依赖项。
单击“确定”完成更改。

您有第三方库的代码还是只有它的JAR文件?