nativescript运行失败 - 未安装build-tools

时间:2016-04-02 05:22:44

标签: android linux facebook-android-sdk nativescript

我刚开始学习nativescript,我做了一个nativescript项目, 当我想通过tns run android --emulator运行时,它说:

You need to have the Android SDK Build-tools 
installed on your system. You have to install version 23
天生医生指挥:

You need to have the Android SDK Build-tools installed on your system. You have to install version 23.
Run android from your command-line to install required Android Build Tools.

You need to have Android SDK 22 or later and the latest Local Maven repository for Support Libraries installed on your system.
Run $ android  to manage the Local Maven repository for Support Libraries.

我的android sdk图片 enter image description here

我也按照本主题中的指令#2回答:Cannot find a compatible Android SDK for compilation when running `tns platform add android`

我的android_home在.bashrc中:

#AndroidDev PATH
export ANDROID_HOME=~/android-sdk-linux/
export PATH=${PATH}:~/android-sdk-linux/tools
export PATH=${PATH}:~/android-sdk-linux/platform-tools

2 个答案:

答案 0 :(得分:2)

我跑了这个并且它已经解决了。

android update sdk --filter tools,platform-tools,android-23,build-tools-23.0.2,extra-android-m2repository,extra-google-m2repository,extra-android-support --all --no-ui

答案 1 :(得分:0)

我无法在Linux环境中真正测试它,但我认为这个主题与您的问题有关 - Android build failing with build.xml:479: SDK does not have any Build Tools installed

用两个词(如主题中所述),您可以尝试

android update sdk -u

然后确保您在Android SDK管理器中安装了构建工具。 最新的linux SDK工具版本是24.4.1