无法运行AAPT命令 - 不断返回" Android SDK中构建工具" [英] Unable to run aapt command - keeps returning "Android SDK Build-tools"

查看:688
本文介绍了无法运行AAPT命令 - 不断返回" Android SDK中构建工具"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在试图做的:在Mac OSX上安装Android构建工具,所以我可以使用 AAPT 命令紧缩/过程一些图片进行测试

What I'm attempting to do: Install the Android build tools on Mac OSX so I can use the aapt command to crunch/process some images for testing

我所做的:


  1. 安装了Android SDK使用BREW

  2. 运行机器人命令,弹出SDK管理器

  3. 使用管理器来安装SDK工具(22.3),SDK平台工具(19),SDK构建工具(19)和Android 4.4

  4. 我已经验证了工具使用BREW时被添加到默认的位置。

  1. Installed the Android SDK using brew
  2. Run the android command to bring up the SDK Manager
  3. Used the Manager to install the SDK tools (22.3), SDK Platform-tools(19), SDK Build-tools(19) and Android 4.4
  4. I've verified that the tools were added to the default location when using brew.

会发生什么:
运行 AAPT AAPT v 总是返回使用机器人工具安装的Android SDK构建的工具。

我也试过用 Android的更新更新的工具,但它仍然无法工作。

I've also tried updating the tools using android update, but it still fails to work.

编辑:
运行完整路径 AAPT v 的作品。现在我假设我有我的 PATH ,我仍然需要解决的问题。

Running the full path to aapt v works. I'm now assuming I have an issue with my PATH which I still need to resolve

任何线索,以什么尝试下一个会是极大的AP preciated。

Any clues as to what to try next would be greatly appreciated.

推荐答案

我是pretty确保Android SDK中不会尝试修改 PATH 变量为您服务。如果您希望能够在没有指定其全路径运行SDK工具,你需要添加包含到您的路径的文件夹(S)一个接一个。

I'm pretty sure that the Android SDK doesn't try to modify your PATH variable for you. If you want to be able to run SDK tools without specifying their full path, you'll need to add the folder(s) containing them to your PATH one by one.

您可以通过编辑〜/ .bash_profile中并添加一行像这样(或编辑现有行这样的,如果你已经有一个),这样做p>

You can do this by editing your ~/.bash_profile and adding a line like so (or editing an existing line like this if you have one already):

export PATH=$PATH:/PATH/TO/android-sdk-macosx/build-tools/17.0.0

另外,你可以调用它的时候,像这样指定的完整路径工具:

Alternatively, you can just specify the full path to the tool when invoking it, like so:

/PATH/TO/android-sdk-macosx/build-tools/17.0.0/aapt v

我不知道这个曾经与 AAPT 发生,但是这可能是如果安装一个工具的多个版本进行区分有用。要查看bash的解析为一个命令的版本,通常可以通过运行找出,就像这样:

I'm not sure this ever happens with aapt, but this can be useful to disambiguate if multiple versions of a tool are installed. To see which version of a command that bash is resolving to, you can usually find out by running which, like so:

which aapt

这篇关于无法运行AAPT命令 - 不断返回" Android SDK中构建工具"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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