Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android: command not found

I tried to make a .jar file from a cloned project:

android update project -p .

but got the error:

android: command not found

I tried to set path to Android SDK, but it didn't help:

export ANDROID_HOME=D:\java\android-sdk
export PATH=$ANDROID_HOME\tools:$PATH
export PATH=$ANDROID_HOME\platform-tools:$PATH

Is it possible to solve this problem?

UPD: I'm using Git Shell from this software: http://git-scm.com/download/win

like image 794
Mark Korzhov Avatar asked Sep 06 '14 18:09

Mark Korzhov


People also ask

What does it mean when command not found?

When you're trying to run a command (with or without sudo ) and get an error message that reads "Command not found," this means the script or file you're trying to execute doesn't exist in the location specified by your PATH variable.

What is Android command line?

The Command-Line Interface (CLI), available for Android devices and supported in Workspace ONE Assist, is the counterpoint to the Graphical User Interface (GUI). While a graphical user interface makes common tasks easy, a command-line interface makes complicated tasks possible.

How do I open the command line in Android Studio?

Open a command line—from Android Studio, select View > Tool Windows > Terminal—and navigate to the directory where your unsigned APK is located. zipalign ensures that all uncompressed data starts with a particular byte alignment relative to the start of the file, which may reduce the amount of RAM consumed by an app.


1 Answers

Finding-android-sdk-on-mac-and-adding-to-path Finding Android SDK on Mac and adding to PATH

To fix

android: command not found error

follow two easy steps (Linux and Mac):

1) Export your Android Sdk path to the ANDROID_HOME variable

$ export ANDROID_HOME=~/Android/Sdk

(change "~" to "$HOME" on Mac)

2) Export Sdk tools path to the PATH variable

$ export PATH=$ANDROID_HOME/tools:$PATH

That's it! run

android

command again to make sure it works properly.

like image 53
Ivan V Avatar answered Nov 07 '22 23:11

Ivan V