我想为我的创建一个ANT脚本,只需一次点击就可以创建构建。
我的应用程序使用了一些本机扩展文件(.ane
文件)。当我试着运行蚂蚁脚本时,它说-
没有为目标平台找到应用程序所需的本机扩展“com.example.mobile.extensions.NativeFeature”的实现
我使用以下代码将ane文件包含在ANT脚本中。
<compiler.external-library-path dir="${basedir}/ane" append="true">
<include name="**/*.ane"/>
</compiler.external-library-path>
还在myApp-app.xml
文件中添加了与我在myApp-app.xml
文件中使用的相同的extension.xml
。
发布于 2015-09-29 07:25:48
解决了这个问题。基本上,我需要在ADT命令中添加-extdr
参数。通过在ADT命令中添加-extdir ${basedir}/ane
,我能够解决这个问题。添加了下面的示例代码。
<target name="package.android" >
<echo message="Packaging for Android"/>
<exec executable="${ADT}" dir="${build.dir}/android">
<arg line="-package
-target apk
-storetype ${build.storetype}
-keystore ${android.cert}
-storepass ${android.cert.password}
${app.name}
${app.name}-app.xml
${app.name}.swf
-extdir ${basedir}/ane
"/>
</exec>
</target>
https://stackoverflow.com/questions/32755390
复制相似问题