zoukankan      html  css  js  c++  java
  • ant打包报错 JRE version less than 1.8 is not suppored

    ant 打包错误如下 :

     解决方案 :

    使用 apache-ant-1.9.15 及之下版本的ant 

    编辑工作空间下文件    .metadata/.plugins/org.eclipse.debug.core/.launches/项目名 build.xml.launch , 添加红色部分代码

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
    <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
    <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
    <listEntry value="/项目名/build.xml"/>
    </listAttribute>
    <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
    <listEntry value="1"/>
    </listAttribute>
    <listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
    <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_39&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
    <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.ant.ui.classpathentry.antHome&quot;&gt;&#13;&#10;&lt;memento antHome=&quot;D:/apache-ant-1.9.15&quot;/&gt;&#13;&#10;&lt;/runtimeClasspathEntry&gt;&#13;&#10;"/>
    <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.ant.ui.classpathentry.extraClasspathEntries&quot;&gt;&#13;&#10;&lt;memento/&gt;&#13;&#10;&lt;/runtimeClasspathEntry&gt;&#13;&#10;"/>
    </listAttribute>
    <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
    <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
    <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_39"/>
    <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.launching.remote.InternalAntRunner"/>
    <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="项目名"/>
    <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
    <stringAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_TARGETS" value="init,clean,generwar,compile1,compile2,copy1,ok,"/>
    <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/项目名/build.xml}"/>
    <stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
    </launchConfiguration>

    注意里面的ant和jdk配置

  • 相关阅读:
    弱网测试(分析篇)
    弱网测试(资料罗列篇)
    2018年上半年系统分析师上午试题答案
    2018年上半年系统分析师案例分析答案
    测试执行过程注意事项
    略看操作系统
    Activity生命周期
    Android中的数据存储
    Android 进程生命周期 Process Lifecycle
    Android学习链接大放送
  • 原文地址:https://www.cnblogs.com/hi-gdl/p/13036401.html
Copyright © 2011-2022 走看看