使用 ant 脚本构建 apk. [英] Building the apk using the ant script .

查看:28
本文介绍了使用 ant 脚本构建 apk.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 ant 脚本创建 .apk 文件时遇到问题.生成的 .apk 命名为 _unaligned.apk 而不是 .apk,在将 _unaligned.apk 文件安装到设备时,我强制关闭显示 java.lang.VerifyError 异常,但使用 IDE 生成的相同 apk 工作正常.我对此震惊了很长时间.能分享一下生成.apk文件的build.xml文件吗?

I am facing problem in creating the .apk file using the ant script . The generated .apk named as _unaligned.apk instead of .apk and on installing the _unaligned.apk file to the device I get force-close showing the java.lang.VerifyError exception, but the same apk generated using IDE works fine. I am struck on this for a long time. Can you share the build.xml file that generates the .apk file?

推荐答案

这个 Bloq 条目 解释了所有必要的步骤.特别是如果您想自定义构建脚本.

this Bloq entry explains all necessary steps. Especially if you want to customize your build script.

如果您正在寻找实际的构建脚本,只需查看您的 Android SDK 文件夹platforms/android-X/templates.应该有一个名为 android_rules.xml 的文件.

If your are looking for the actual build script, just look into your Android SDK folder platforms/android-X/templates. There should be a file called android_rules.xml.

我自定义了我的构建脚本来清理、构建、签名并将 apk 分发到连接的设备.如果您愿意,我可以为您提供我的脚本.联系我吧!

I customized my build script to clean, build, sign and distributing the apk to an attached device. If you like, I can provide you with my script. Just contact me!

这篇关于使用 ant 脚本构建 apk.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆