Android SDK and Path
Solution 1
I don't know what happened as I don't know much technical details behind it. but I removed the following line
export ANDROID_SDK_HOME ={PATH}:/opt/android/sdk
and restarted the terminal and ran ddms
it worked.
Solution 2
The correct configuration in your case would look like this:
export ANDROID_HOME=/opt/android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Note that the environment variable is called ANDROID_HOME
, not ANDROID_SDK_HOME
. Also, the third line in your sample was missing a $
sign (and contained an additional space). Lastly, there is no need to repeat the same path (DRY) - just use the already defined variable.
EDIT (2020-03-08):
While the ANDROID_SDK
environment variable still continues to work for the most part, it has been deprecated by Google, and replaced with ANDROID_SDK_ROOT
. So you might want to use the new name for a new setup.
More details: https://developer.android.com/studio/command-line/variables
Related videos on Youtube
Mayu Mayooresan
I'm iOS / React Native Developer but I also do some Android, HTML5, Laravel and NodeJS. You can follow me at Twitter @mayooresan or connect with me at LinkedIn If you like my answers and posts then probably you will like my blog Mayu's IT Diary
Updated on September 18, 2022Comments
-
Mayu Mayooresan over 1 year
Since I've downloaded the Android development kit as a package (sdk, eclipse bundled together), I extracted it into
/opt/android/sdk
I ran the command
nano ~/.bashrc
command and opened the file. Now I set the path as belowexport PATH=${PATH}:/opt/android/sdk/tools export PATH=${PATH}:/opt/android/sdk/platform-tools export ANDROID_SDK_HOME ={PATH}:/opt/android/sdk
But it doesn't seem to help at all, when I run
ddms
in command prompt I get error message sayingno command ddmds found
.If we set the path variable in windows correctly the
ddms
command would work correctly. I assume its a problem with the way I set the path.Can someone please help me out. Thanks.