【问题标题】:How do you add 'org.eclipse.core:org.eclipse.core.runtime:3.7.0' library to Intellij ant build如何将 'org.eclipse.core:org.eclipse.core.runtime:3.7.0' 库添加到 Intellij ant build
【发布时间】:2015-12-24 19:59:01
【问题描述】:

我可以在 gradle 中解决 compile 'org.eclipse.core:org.eclipse.core.runtime:3.7.0' ,而是使用带有 Intellij 想法的 ant。我已将 org.eclipse.core.runtime-3.7.0.jar 包含在我的 libs 文件夹中。我收到以下错误。

错误:(22, 32) java: 找不到符号 符号: IProgressMonitor 类 位置:包org.eclipse.core.runtime

错误:(23, 32) java: 找不到符号 符号:IStatus 类 位置:包org.eclipse.core.runtime

错误:(24, 32) java: 找不到符号 符号:类状态 位置:包org.eclipse.core.runtime

我正在尝试构建 Android 的 UIAutomatorView,如果我将代码放入 Android Studio,它似乎可以通过 compile 'org.eclipse.core:org.eclipse.core.runtime:3.7.0' 解决 IProgressMonitor 等问题毕业。

这是我的项目结构和源错误的屏幕截图。

有没有一种简单的方法可以将它添加到 ant 或只是将项目转换为 gradle(请提供详细步骤)。

【问题讨论】:

    标签: java ant android-uiautomator intellij-13


    【解决方案1】:

    您的项目应该有一个 build.xml 文件。查找用于编译代码的 javac 任务(在构建文件中),并确保您的 jar 位于其中定义的类路径中。如果不是,就复制进去。

    示例取自以下链接:

    <javac srcdir="${src}"
         destdir="${build}"
         includes="mypackage/p1/**,mypackage/p2/**"
         excludes="mypackage/p1/testpackage/**"
         classpath="YOUR_REQUIRED_JAR_FILE_HERE.jar"
         debug="on"
    />
    

    来源:https://ant.apache.org/manual/Tasks/javac.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-05-05
      • 1970-01-01
      • 1970-01-01
      • 2013-11-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多