ant build apk ,how to use “renderscriptSupportOutOut” attribute?

n my project,i use ant to build my apk package.Every time,after upgrade my android sdk, i have to adjust my build script.Could any one tell me how to find the change document?

here is my question: 1st build: the console raise error :

BUILD FAILED
build.xml:140: Missing attribute renderscriptSupportOutOut

the error script location is:

<dependency
libraryFolderPathOut="project.library.folder.path"
libraryPackagesOut="project.library.packages"
libraryManifestFilePathOut="project.library.manifest.file.path"
libraryResFolderPathOut="project.library.res.folder.path"
libraryBinAidlFolderPathOut="project.library.bin.aidl.folder.path"
libraryNativeFolderPathOut="project.library.native.folder.path"
libraryRFilePathOut="project.library.rfile.path"
jarLibraryPathOut="project.all.jars.path"
buildToolsFolder="${sdk.dir}/build-tools"
targetApi="15"
verbose="${verbose}"/>

2nd build,after adding “renderscriptSupportOutOut” attribute the console raise error :






BUILD FAILED
build.xml:140: dependency doesn't support the "renderscriptSupportOutOut" attribute
here my buid.xml section:
here my buid.xml section:
<projectname=“MyApp”
default="release"basedir=".">
<condition
property="exe"value=".exe"else="">
<os
family="windows"/></condition>
<conditionproperty="bat"value=".bat"else="">
<os
family="windows"/></condition>
<propertyname="verbose"value="false"/>
<propertyfile="setting.properties"/>
<propertyfile="project.properties"/>
<propertyname="sdk.dir"value="/WorkStation/Android/android-sdk-mac_86"/>
<propertyname="key.keystore"value=""/>
<propertyname="key.keystore.password"value=""/>
<propertyname="key.alias"value=""/>
<propertyname="key.alias.password"value=""/>
<propertyname="sdk.tool.dir"location="${sdk.dir}/tools"/>
<propertyname="sdk.platform.tool.dir"location="${sdk.dir}/platform-tools"/>
<propertyname="sdk.platform.build.tool.dir"location="${sdk.dir}/build-tools/17.0.0"/>
<propertyname="aidl"value="${sdk.platform.build.tool.dir}/aidl${exe}"/>
<propertyname="aapt"location="${sdk.platform.build.tool.dir}/aapt${exe}"/>
<propertyname="dx"location="${sdk.platform.build.tool.dir}/dx${bat}"/>
<propertyname="adb"location="${sdk.platform.tool.dir}/adb${exe}"/>
<propertyname="sdk.tool.android.jar"value="${sdk.dir}/platforms/android-15/android.jar"/>
<propertyname="sdk.tool.framework.aidl"value="${sdk.dir}/platforms/android-15/framework.aidl"/>
<propertyname="zipalign"location="${sdk.tool.dir}/zipalign${exe}"/>
<propertyname="jarsigner"location="${jdk.home}/bin/jarsigner${exe}"/>
<propertyname="proguard.jar"location="${sdk.tool.dir}/proguard/lib/proguard.jar"/>
<propertyname="proguard.cfg"location="proguard.cfg"/>
<propertyname="project.name"value=“MyApp”/>
<propertyname="project.home"location="${base.dir}"/>
<propertyname="project.apk.name"value="${project.name}_beta"/>
<propertyname="pkgutil.dir"location=“${MyApp.home}/ant/pkgutil.jar" />
<propertyname="src"value="src"/>
<propertyname="presrc"value="presrc"/>
<propertyname="res"value="res"/>
<propertyname="libs"value="libs"/>
<propertyname="native.lib"value="libs"/>
<propertyname="assets"value="assets"/>
<propertyname="gen"value="gen"/>
<propertyname="bin"value="antbin"/>
<propertyname="deploy"value="deploy"/>
<propertyname="src.dir"location="${basedir}/${src}"/>
<propertyname="presrc.dir"location="${basedir}/${presrc}"/>
<propertyname="res.dir"location="${res}"/>
<propertyname="libs.dir"location="${libs}"/>
<propertyname="native.lib.dir"location="${libs}"/>
<propertyname="assets.dir"location="${assets}"/>
<propertyname="gen.dir"location="${gen}"/>
<propertyname="out.dir"location="${bin}"/>
<propertyname="out.classes.dir"location="${out.dir}/classes"/>
<propertyname="out.aidl.dir"location="${out.dir}/aidl"/>
<propertyname="dex.file.dir"location="${out.dir}/classes.dex"/>
<propertyname="manifest.dir"location="${basedir}/AndroidManifest.xml"/>
<propertyname="proguard.dir"location="${out.dir}/proguard"/>
<propertyname="unsigned-apk"location="${out.dir}/${project.apk.name}_unsigned.apk"/>
<propertyname="released-apk"location="${out.dir}/${project.name}_release.apk"/>
<propertyname="zipalign-pkg-path"location="${basedir}/${bin}/${project.apk.name}_release_zipalign.apk"/><propertyname="temp.dir"location="${basedir}/temp"/>
<propertyname="temp.res.dir"value="${temp.dir}/res"/>
<propertyname="temp.libs.dir"value="${temp.dir}/libs"/>
<propertyname="deploy.dir"location="${deploy}"/>
<propertyname="temp.manifest.dir"location="${temp.dir}/AndroidManifest.xml"/>
<propertyname="temp.assets.dir"location="${temp.dir}/assets"/>
<propertyname="mapping.dir"location="${basedir}/mapping"/>
<pathid="android.antlibs">
<pathelementpath="${sdk.dir}/tools/lib/ant-tasks.jar"/>
<pathelementpath="${sdk.dir}/tools/lib/sdklib.jar"/>
<pathelementpath="${sdk.dir}/tools/lib/androidprefs.jar"/>
<pathelementpath="${sdk.dir}/tools/lib/apkbuilder.jar"/>
</path>

<taskdef
resource="anttasks.properties"
classpathref="android.antlibs"/>

<gettarget
androidJarFileOut="project.target.android.jar"
androidAidlFileOut="project.target.framework.aidl"
bootClassPathOut="project.target.class.path"
targetApiOut="project.target.apilevel"
minSdkVersionOut="project.minSdkVersion"/>

<xpath
input="${manifest.dir}"
expression="/manifest/application/@android:hasCode"
output="manifest.hasCode"
default="true"/>

<xpath
input="${manifest.dir}"
expression="/manifest/@package"
output="oldPackageName"default="true"/>

<xpath
input="${manifest.dir}"
expression="/manifest/application/provider/@android:authorities"
output="oldAuthoritiesForProvider"
default="true"/>

<dependency
libraryFolderPathOut="project.library.folder.path"
libraryPackagesOut="project.library.packages"
libraryManifestFilePathOut="project.library.manifest.file.path"
libraryResFolderPathOut="project.library.res.folder.path"
libraryBinAidlFolderPathOut="project.library.bin.aidl.folder.path"
libraryNativeFolderPathOut="project.library.native.folder.path"
libraryRFilePathOut="project.library.rfile.path"
jarLibraryPathOut="project.all.jars.path"
buildToolsFolder="${sdk.dir}/build-tools"
renderscriptSupportOutOut="${sdk.dir}/build-tools/renderscript"
targetApi="15"
verbose="${verbose}"
/>

1 Answer

Check how dependancy is written in android-sdk\tools\ant\build.xml
<dependency
libraryFolderPathOut="project.library.folder.path"
libraryPackagesOut="project.library.packages"
libraryManifestFilePathOut="project.library.manifest.file.path"
libraryResFolderPathOut="project.library.res.folder.path"
libraryBinAidlFolderPathOut="project.library.bin.aidl.folder.path"
libraryRFilePathOut="project.library.bin.r.file.path"
libraryNativeFolderPathOut="project.library.native.folder.path"
jarLibraryPathOut="project.all.jars.path"
targetApi="${project.target.apilevel}"
renderscriptSupportMode="${renderscript.support.mode}"
buildToolsFolder="${android.build.tools.dir}"
renderscriptSupportLibsOut="project.rs.support.libs.path"
verbose="${verbose}"/>
 
 







]]>		

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注