Cordova构建失败

时间:2017-06-02 14:36:23

标签: android cordova

您好我正在尝试在ubuntu 16.04上设置一个cordova环境,我安装了android studio,而且我所安装的是所有的依赖安装,但是当我运行cordova构建时,我得到以下错误,有人可以帮助什么依赖性我不见了?

FAILURE: Build failed with an exception.

* Where:
Script '/fast/html/slim_phone/slimapps/platforms/android/CordovaLib/cordova.gradle' line: 64

* What went wrong:
A problem occurred evaluating root project 'android'.
> No installed build tools found. Install the Android build tools version 19.1.0 or higher.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

但是我安装了Android构建工具19.1.0和25.0

#/fast/home/tholum/Android/Sdk/tools/bin/sdkmanager --list
Installed packages:
  Path                        | Version | Description                    | Location                    
  -------                     | ------- | -------                        | -------                     
  build-tools;19.1.0          | 19.1.0  | Android SDK Build-Tools 19.1   | build-tools/19.1.0/         
  build-tools;25.0.3          | 25.0.3  | Android SDK Build-Tools 25.0.3 | build-tools/25.0.3/         
  emulator                    | 26.0.3  | Android Emulator               | emulator/                   
  extras;android;m2repository | 47.0.0  | Android Support Repository     | extras/android/m2repository/
  extras;google;m2repository  | 51      | Google Repository              | extras/google/m2repository/ 
  patcher;v4                  | 1       | SDK Patch Applier v4           | patcher/v4/                 
  platform-tools              | 25.0.6  | Android SDK Platform-Tools     | platform-tools/             
  platforms;android-25        | 3       | Android SDK Platform 25        | platforms/android-25/       
  sources;android-25          | 1       | Sources for Android 25         | sources/android-25/         
  tools                       | 26.0.2  | Android SDK Tools              | tools/           

1 个答案:

答案 0 :(得分:0)

问题在于我的ANDROID_HOME

export ANDROID_HOME="/home/tholum/Android/Sdk/tools"

应该是

export ANDROID_HOME="/home/tholum/Android/Sdk/"