我正在开发一个移动应用程序使用sencha touch和phonegap的android目标。我需要创建用于构建sencha touch应用程序和创建apk文件的蚂蚁构建脚本。应该将该apk文件移动到某个位置,以便将应用程序分发给团队。我无法增强build.xml文件来做同样的事情,这是在sencha touch应用程序文件夹上。
我如何创建将创建.apk文件的构建,并移动到分发应用程序的某个位置。
--Sridhar
发布于 2014-08-13 14:15:02
您可以使用ANT创建android(apk)版本。您的build.xml应包含以下命令的任务
你可以使用下面的示例来创建android版本。
<target name="production">
<exec executable="cmd" dir="app">
<arg line="/c 'sencha app build production'"/>
</exec>
</target>
<target name="build" depends="production">
<delete dir="${cordova-path}/www"/>
<copy todir="${cordova-path}/www">
<fileset dir="app/build/my_app/production" />
</copy>
<copy file="${cordova-path}/config.xml" todir="${cordova-path}/www" overwrite="true" />
<exec dir="${cordova-path}" executable="cmd">
<arg line="/c 'cordova build'"/>
</exec>
</target>
<target name="deploy" depends="build">
<copy file="${cordova-path}/platforms/android/bin/app-debug.apk" todir="." overwrite="true" />
</target>
您可以简单地使用"ant build“来执行上面的脚本。确保正确安装了ant和cordova。
https://stackoverflow.com/questions/23012433
复制相似问题