【问题标题】:Android: Not able to add Android Library to the ProjectAndroid:无法将 Android 库添加到项目中
【发布时间】:2012-02-18 05:41:10
【问题描述】:

我正在使用 Eclipse 开发 Android 应用程序。我正在将一个示例导入 Eclipse 工作区。但我无法运行该项目,因为它不会将 Android 库加载到该项目中。

请看这个屏幕截图:

在 SlidingDrawer 中添加了 Android 2.2 库,但在 SlidingDrawer_Original 中我无法加载 android 库。

我已经清理了项目并建立了工作区,但问题仍然没有解决。

如果我从 SlidingDrawer_Original 打开 Java 文件,则如下图所示:

那么我应该怎么做才能加载 Android 库?

【问题讨论】:

    标签: android eclipse eclipse-plugin android-2.2-froyo android-sdk-2.3


    【解决方案1】:

    右击项目属性>选择Android>选择你的目标AVD

    【讨论】:

    • 我无法选择目标AVD。
    【解决方案2】:

    会有一个名为 .classpath 的文件,只需检查此文件的属性,它必须处于只读模式,将其更改为存档模式并清理项目并设置正确的项目构建并重试。

    【讨论】:

      【解决方案3】:

      我不知道为什么会这样,但据我所知,Eclipse 总是需要它的属性文件。在某些 Eclipse 中,它被命名为 default.properties,而在某些 Eclipse 中,它被命名为 project.properties。

      我只需复制粘贴 default.Properties 文件并将其放入该项目。 然后在同一个 Workspace 中创建该项目的副本并删除前一个项目。

      它解决了我的问题。希望对你也有帮助。

      享受。 :)

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-11-25
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多