java - 如何在命令行中创建apk文件?

标签 java android eclipse ant command-line

我正在使用 eclipse ide 构建 apk 文件。现在我想在 linux 的命令行中创建 apk 文件。 但是当我说 ant debug 时,它会出现以下错误:

Unable to obtain resource from anttasks.jar
  java.util.zip.ZipException : error in opening zip file

Problem : failed to create task or type checkenv 
Cause : The name is undefined 
Action : Check the spelling
Action : Check that any custom tasks/types have been declared
Action : Check that any <presetdef>/<macrodef> declarations have taken place

我有 Ant 版本 1.9.2 。和安卓版本 17。 我有 build.xml 文件。

编辑:我将我的 ant 版本更改为 1.8.0,但无论我做什么,我仍然遇到无法创建任务或类型 checkenv 的错误。

最佳答案

关于java - 如何在命令行中创建apk文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18755109/

相关文章:

android - 制作高级版应用程序的最佳方式?

java - java eclipse中的断点错误

java - Glassfish java错误: "Exception while preparing the app"

java - 无法打开数据库/无法将(数据库)的区域设置更改为 'en_US'

java - 将多行 TextView 调整为正确的大小

java - 如何使用 TestNG DataProvider 传递 > 10 个参数?

java - Firebase 通知白圈问题

android - 如何计算 Android 的 GMSGeometryDistance

java - 我在哪里放置java程序输入的图像?

bat 文件中的 java 程序参数