侧边栏壁纸
博主头像
最闪啊姚凌武!博主等级

天下武功,唯快不破

  • 累计撰写 293 篇文章
  • 累计创建 34 个标签
  • 累计收到 10 条评论

目 录CONTENT

文章目录

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

姚凌武
2014-09-11 / 0 评论 / 0 点赞 / 21 阅读 / 37809 字
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:

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:
name=“MyApp”
default="release"basedir=".">
property="exe"value=".exe"else="">
family="windows"/>
property="bat"value=".bat"else="">
family="windows"/>
name="verbose"value="false"/>
file="setting.properties"/>
file="project.properties"/>
name="sdk.dir"value="/WorkStation/Android/android-sdk-mac_86"/>
name="key.keystore"value=""/>
name="key.keystore.password"value=""/>
name="key.alias"value=""/>
name="key.alias.password"value=""/>
name="sdk.tool.dir"location="${sdk.dir}/tools"/>
name="sdk.platform.tool.dir"location="${sdk.dir}/platform-tools"/>
name="sdk.platform.build.tool.dir"location="${sdk.dir}/build-tools/17.0.0"/>
name="aidl"value="${sdk.platform.build.tool.dir}/aidl${exe}"/>
name="aapt"location="${sdk.platform.build.tool.dir}/aapt${exe}"/>
name="dx"location="${sdk.platform.build.tool.dir}/dx${bat}"/>
name="adb"location="${sdk.platform.tool.dir}/adb${exe}"/>
name="sdk.tool.android.jar"value="${sdk.dir}/platforms/android-15/android.jar"/>
name="sdk.tool.framework.aidl"value="${sdk.dir}/platforms/android-15/framework.aidl"/>
name="zipalign"location="${sdk.tool.dir}/zipalign${exe}"/>
name="jarsigner"location="${jdk.home}/bin/jarsigner${exe}"/>
name="proguard.jar"location="${sdk.tool.dir}/proguard/lib/proguard.jar"/>
name="proguard.cfg"location="proguard.cfg"/>
name="project.name"value=“MyApp”/>
name="project.home"location="${base.dir}"/>
name="project.apk.name"value="${project.name}_beta"/>
name="pkgutil.dir"location=“${MyApp.home}/ant/pkgutil.jar" />
name="src"value="src"/>
name="presrc"value="presrc"/>
name="res"value="res"/>
name="libs"value="libs"/>
name="native.lib"value="libs"/>
name="assets"value="assets"/>
name="gen"value="gen"/>
name="bin"value="antbin"/>
name="deploy"value="deploy"/>
name="src.dir"location="${basedir}/${src}"/>
name="presrc.dir"location="${basedir}/${presrc}"/>
name="res.dir"location="${res}"/>
name="libs.dir"location="${libs}"/>
name="native.lib.dir"location="${libs}"/>
name="assets.dir"location="${assets}"/>
name="gen.dir"location="${gen}"/>
name="out.dir"location="${bin}"/>
name="out.classes.dir"location="${out.dir}/classes"/>
name="out.aidl.dir"location="${out.dir}/aidl"/>
name="dex.file.dir"location="${out.dir}/classes.dex"/>
name="manifest.dir"location="${basedir}/AndroidManifest.xml"/>
name="proguard.dir"location="${out.dir}/proguard"/>
name="unsigned-apk"location="${out.dir}/${project.apk.name}_unsigned.apk"/>
name="released-apk"location="${out.dir}/${project.name}_release.apk"/>
name="zipalign-pkg-path"location="${basedir}/${bin}/${project.apk.name}_release_zipalign.apk"/>name="temp.dir"location="${basedir}/temp"/>
name="temp.res.dir"value="${temp.dir}/res"/>
name="temp.libs.dir"value="${temp.dir}/libs"/>
name="deploy.dir"location="${deploy}"/>
name="temp.manifest.dir"location="${temp.dir}/AndroidManifest.xml"/>
name="temp.assets.dir"location="${temp.dir}/assets"/>
name="mapping.dir"location="${basedir}/mapping"/>
id="android.antlibs">
path="${sdk.dir}/tools/lib/ant-tasks.jar"/>
path="${sdk.dir}/tools/lib/sdklib.jar"/>
path="${sdk.dir}/tools/lib/androidprefs.jar"/>
path="${sdk.dir}/tools/lib/apkbuilder.jar"/>


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

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

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

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

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

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
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}"/>
 
 

]]>		
      
      
    
0

评论区