android - 在 ubuntu 终端中使用 ANT 生成 apk

标签 android ubuntu ant terminal

我正在尝试通过终端使用 Ant 生成动态 APK。我在我的系统中找不到“build.XML”。我试过这个命令, ant debug 在终端中。

但是我得到了这样的错误:

Buildfile: build.xml does not exist!
Build failed

我试过这个命令 android update project -t android-10 -p,但是 我得到这样的错误:
android:找不到命令。

最佳答案

您需要确保android 工具已添加到您的PATH

例如,您可以临时这样做:

export PATH=$PATH:/path/to/android-sdk/tools

假设Android SDK工具安装在/path/to/android-sdk/tools

关于android - 在 ubuntu 终端中使用 ANT 生成 apk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29764945/

相关文章:

linux - 发行版维护者(即 Ubuntu、Fedora)使用什么工具进行构建/依赖管理?

linux - Nagios Web 界面访问,在本地主机上没有斜杠

java - 在 Ant 中使用 Sonar 仅用于 JaCoCo 的代码覆盖率(无静态分析)

Ant 移动、复制任务在 Jenkins 中的映射驱动器上失败

android - 库项目 build.gradle 中 buildscript 标签的最佳实践

java - Android:将 httpURLConnection 连接到服务器

c - libgcc_s.so : Error adding symbols: File in wrong format

multithreading - ImageMagickidentify.exe在并行Apache Ant项目中不返回任何内容

java - Android 中的 XMPP 连接错误

android - 将 Android 库发布到 bintray maven 会产生 2 个独立的 Artifact