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
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With