'Android'命令被折旧,cordova,Ionic2

时间:2017-05-24 04:35:53

标签: cordova ionic2

我正在创建一个Ionic2 + cordova项目。

我的离子信息是

global packages:

@ionic/cli-utils : 1.2.0
Cordova CLI      : 7.0.1 
Ionic CLI        : 3.2.0

本地包裹:

@ionic/app-scripts              : 1.3.0
@ionic/cli-plugin-cordova       : 1.2.0
@ionic/cli-plugin-ionic-angular : 1.2.0
Cordova Platforms               : android 6.2.3
Ionic Framework                 : ionic-angular 3.0.1

系统:

Node       : v6.10.3
OS         : Linux 4.4
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed

这给了我错误

Installing "cordova-plugin-network-information" for android
    Failed to install 'cordova-plugin-network-information': CordovaError: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
    Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.

echo $ ANDROID_HOME 给了我

/home/raju/Android/Sdk

android 给了我

The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*************************************************************************
Invalid or unsupported command ""

Supported commands are:
android list target
android list avd
android list device
android create avd
android move avd
android delete avd
android list sdk
android update sdk

我的 .profile 文件有# set PATH so it includes user's private bin directories PATH="$HOME/bin:$HOME/.local/bin:$PATH" export ANDROID_HOME="/home/raju/Android/Sdk/" export PATH="${PATH}:${ANDROID_HOME}tools/:${ANDROID_HOME}platform-tools/"

此问题发生在新的ionic2 cli中。

请帮忙。

编辑:cordova要求提供Requirements check results for android: Java JDK: installed 1.8.0 Android SDK: installed true Android target: installed android-25,android-24,android-23 Gradle: installed /usr/lib/gradle/3.5/bin/gradle

0 个答案:

没有答案