ant build 出错Android build.xml renderscript doesn't support includepath

ANT build的时候出现了如下错误:
renderscript doesn't support the "includePath" attribute
这是因为将adt版本更新到了 20.0.1.的缘故。所以做以下修改:
将build.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>
更改如下:
<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>
然后将build.xml里的如下代码:
<path id="android.renderscript.include.path">         <pathelement location="${android.platform.tools.dir}/renderscript/include" />         <pathelement location="${android.platform.tools.dir}/renderscript/clang-include" />     </path> 
 
 
修改如下:
<path id="android.renderscript.include.path">
    <pathelement location="${android.platform.tools.dir}/renderscript/include" />
    <pathelement location="${android.platform.tools.dir}/renderscript/clang-include" />
</path>

保存后重新ant build就ok了。
 

你可能感兴趣的:(ant build 出错Android build.xml renderscript doesn't support includepath)