Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android build.xml renderscript不';不支持includepath_Android_Ant_Hudson - Fatal编程技术网

Android build.xml renderscript不';不支持includepath

Android build.xml renderscript不';不支持includepath,android,ant,hudson,Android,Ant,Hudson,我正在使用ant运行我的android项目,以便继续使用Hudson运行它。我在mac上创建了build.xml,我没有导入生成的android build.xml,而是复制/粘贴了它,因为我必须自定义一些东西 但是,当我在服务器上的hudson上运行它时,它在我的本地机器上运行良好。我在Renderscript属性中遇到错误 renderscript doesn't support the "includePath" attribute 因此,我决定去掉xml中的这一行,转换代码: <

我正在使用ant运行我的android项目,以便继续使用Hudson运行它。我在mac上创建了build.xml,我没有导入生成的android build.xml,而是复制/粘贴了它,因为我必须自定义一些东西

但是,当我在服务器上的hudson上运行它时,它在我的本地机器上运行良好。我在Renderscript属性中遇到错误

renderscript doesn't support the "includePath" attribute
因此,我决定去掉xml中的这一行,转换代码:

 <renderscript executable="${renderscript}"
                includePath="${android.renderscript.include.path}"
                genFolder="${gen.absolute.dir}"
                resFolder="${out.res.absolute.dir}/raw"
                targetApi="${project.minSdkVersion}"
                optLevel="${renderscript.opt.level}"
                buildType="${build.is.packaging.debug}"
                previousBuildType="${build.last.is.packaging.debug}">
            <source path="${source.absolute.dir}"/>
        </renderscript>
我在两台机器上运行相同的ant,在服务器上下载了linux特定的SDK,并根据工具、平台工具和android-7(我支持的操作系统)进行了更新。我已经想不出问题可能是什么了,任何帮助或指点都会令人惊讶


谢谢

发生此错误是因为您将android sdk工具的修订版更新为20.0.1

renderscript需要includePathRefId属性,其路径已更改。因此,您的代码应该是:

<renderscript executable="${renderscript}"
            includePathRefId="android.renderscript.include.path"
            genFolder="${gen.absolute.dir}"
            resFolder="${out.res.absolute.dir}/raw"
            targetApi="${project.minSdkVersion}"
            optLevel="${renderscript.opt.level}"
            buildType="${build.is.packaging.debug}"
            previousBuildType="${build.last.is.packaging.debug}">
        <source path="${source.absolute.dir}"/>
    </renderscript>

如果includePathRefId,则应如下定义:

<path id="android.renderscript.include.path">
    <pathelement location="${android.platform.tools.dir}/renderscript/include" />
    <pathelement location="${android.platform.tools.dir}/renderscript/clang-include" />
</path>

这最终发生了,因为我通过类路径忽略了一些文件。这是一个简单但被忽视的错误

<renderscript executable="${renderscript}"
            includePathRefId="android.renderscript.include.path"
            genFolder="${gen.absolute.dir}"
            resFolder="${out.res.absolute.dir}/raw"
            targetApi="${project.minSdkVersion}"
            optLevel="${renderscript.opt.level}"
            buildType="${build.is.packaging.debug}"
            previousBuildType="${build.last.is.packaging.debug}">
        <source path="${source.absolute.dir}"/>
    </renderscript>
<path id="android.renderscript.include.path">
    <pathelement location="${android.platform.tools.dir}/renderscript/include" />
    <pathelement location="${android.platform.tools.dir}/renderscript/clang-include" />
</path>