Android的缺失平台工具 [英] Android missing platform tools

查看:146
本文介绍了Android的缺失平台工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请能有人帮助我,我有一个Ubuntu服务器(终端只),我已经下载了Android SDK中,我已经安装Java,当/工具,我尝试运行./android,我得到一个错误失踪平台工具。因此,如何从终端做我安装平台工具,由于某种原因,我不能在任何地方找到这些信息。

Please can someone assist me with this, I have an Ubuntu server (terminal only), I have downloaded the android SDK, I have java installed, when in /tools I try to run ./android and I get an error Missing platform-tools. So how do I from terminal install the platform tools, for some reason I cant find this information anywhere.

每一个资源,我觉得假设我有一个图形用户界面,而不是终端,即使是Ubuntu的页面 - <一个href="https://help.ubuntu.com/community/AndroidSDK">https://help.ubuntu.com/community/AndroidSDK

Every resource I find assumes I have a GUI and not terminal, even ubuntu's page - https://help.ubuntu.com/community/AndroidSDK

推荐答案

Android的经理有一个图形界面。但它也可以通过对某些情况下命令行中使用,比如你有一个CI构建服务器,你把你的code到服务器进行编译。

Android manager has a graphical interface. But it can also be used via command line for some cases, for example you have a CI build server and you push your code to server for compiling.

-u 运行(无UI)选项:

Run with -u (no UI) option :

android update sdk -u

接受许可证(),并安装任何需要。

Accept licenses (y) and install whatever is needed.

在Linux上:您可以添加的android工具 $ PATH

On Linux: You can add android tools to $PATH:

让我们说SDK目录是 /家庭/用户/ SDK 则:

Lets say sdk directory is /home/user/sdk then:

修改用户的bash配置文件:

edit user's bash profile:

nano ~/.bashrc

添加以下内容吧:

export ANDROID_HOME=/home/user/sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/build-tools

和储存( CTRL + O 然后 CTRL + X

注销并重新登录,从终端上运行:

Logout and login again, run from terminal:

echo $PATH

来验证。

这篇关于Android的缺失平台工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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