【问题标题】:How to add the jar file into the build path如何将jar文件添加到构建路径中
【发布时间】:2011-06-13 06:58:53
【问题描述】:

目前我正在处理从 ftp 服务器到 android 的 nd 文件上传和下载。现在我有我需要在我的应用程序中使用的 jar 文件。可以请建议我如何将 jar 文件添加到构建路径中。

【问题讨论】:

标签: android jar


【解决方案1】:

试试这个:

右键project->properties->Java Build Path->Libraries->Add External Jars->选择你电脑里的jar文件->点击确定。

【讨论】:

    【解决方案2】:

    在您的 .classpath 文件中,该文件应如下所示:

    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
      <classpathentry kind="src" path="src"/>
      <classpathentry kind="src" path="gen"/>
      <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK" />        
      <classpathentry kind="output" path="bin"/>
    </classpath>
    

    添加一行

    <classpathentry kind="lib" path="<path to your .jar file>"/>  
    

    【讨论】:

      【解决方案3】:

      只要输入

      <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK" />
      

      在您的 .classpath 中,然后您可以更改构建路径中的 android.jar,只需在 project-> properties-> Android 中选择您想要的 Android API 级别(构建路径会自动更新)

      【讨论】:

        猜你喜欢
        • 2012-08-05
        • 2011-02-13
        • 1970-01-01
        • 1970-01-01
        • 2012-11-21
        • 2014-01-20
        • 2012-05-10
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多