Android SDK manager does not open - android

I have Android SDK installed on Debian.
However, when i go to sdk/tools/bin and I try to open sdkmanager using terminal, it says
bash: sdkmanager: command not found.
The file file sdkmanager is there, so why it doesn't work?

How are you entering the command to start the sdkmanager. You should be entering ./sdkmanager, unless the 'sdk/tools/bin' folder or the sdkmanager command is on your PATH (How to add a directory to your path)

Related

How do I install the Android NDK bundle using the command line?

The Android NDK can now be installed directly from the SDK manager instead of only as a separate download. How can I install the NDK package from the command line?
I've tried:
android sdk update -u -n -a
but no NDK package appears to be visible in the listing. It only shows up in the UI.
In Android Studio 2.3 is sdkmanager tool
It is located in the sdk directory (i.e. ~/Android/Sdk/tools/bin)
to get a list of installed and available packages goto the directory where the sdkmanager binary is located and type ./sdkmanager --list
to install NDK directly use ./sdkmanager "ndk-bundle"
(./sdkmanager "lldb;2.3", ./sdkmanager "cmake;3.6.3155560")
https://developer.android.com/studio/command-line/sdkmanager.html
Download zip file of required version of ndk from developer.android.com. E.g. for linux:
wget https://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip
Extract zip to some folder, e.g. c:/android/android-ndk-r13b/
Add/update the path to that folder in the local.properties file of your application.
ndk.dir=c:\android\android-ndk-r13b

PhoneGap: Unable to Create Android App using Terminal

I try to create an android app using PhoneGap on my Mac. But, I only can create the app (hello) and couldn't create the Android platform for it using $ cordova platform add android command.
The error message I get is: [Error: The command android failed. Make sure you have the latest Android SDK installed, and the android command (inside the tools/ folder) added to your path. Output: ]
The screenshot:
I try to put the PATH in the bash profile file using touch ~/.bash_profile; open ~/.bash_profile method, but it still didn't work.
How to solve this problem?
try this one
install android sdk in /Applications then rename the andoid sdk folder's name to android_sdk
create .bash_profile in this directory, /Users/zulhilmizainudin
open .bash_profile then type this command
export PATH=/Applications/android_sdk/tools:$PATH
export ANDROID="/Applications/android_sdk/tools"
Save .bash_profile file
type android command in your terminal

Launch Android SDK manager - Tools directory doesn't exist? Mac

I'm on mac, I think I've done everything right so far. following these instructions:
http://developer.android.com/sdk/installing/adding-packages.html
it says to navigate to tools/ directory in terminal. Here are my steps.
Open terminal
cd Applications
result is: No such file or directory
path to my tools directory is as follows
Applications->adt-bundle-mac-x86_64-20130219 ->SDK -> tools
I tried putting my folder onto my desktop, both the tools folder, and my adt-bundle because I could change directory to my desktop, and when I enter ls to the terminal I see my tools folder, and my adt-bundle is there,
but the problem is when I try to enter
cd tools
or
cd adt-bundle(etc...)
it says that it is not a directory.
what do I do?
Go to this directory:
cd /adt-bundle-mac-x86_64-20131030/sdk/tools
and run:
./android
I recently encountered this issue, and figured I'd post on this for clarification or for anyone still encountering it.
It seems you have to be at the root of the /adt-bundle-mac-VERSION/sdkdirectory in order to execute the "android" command.
I normally cd into the directory until I reach the location of the command, but in this case I encountered the same issue as the original poster.
You must use the tab key to the android command...
ie...
locate your installation /adt-bundle-mac-x86_64-20131030/sdk hit TAB key /tools hit TAB key /android
instead of cd adt-bundle-mac-x86_64-20131030/ cd/sdk cd/tools android
If done properly the SDK manager should launch for you.
Hope this helps anybody out there.
You can launch the SDK Manager by using the GUI:
Launch Android Studio
Create a new blank project
In the toolbar, look for the icon with tooltip "SDK Manager"
A lot of answers have been given here that you should go to /{path-to-your-android-sdk}/tools
and run ./android.
For me, this did not work. When I opened the android file located at my /{path-to-your-android-sdk}/tools directory with a text editor, it contained the following:
#!/bin/bash
echo The "android" command is no longer available.
echo For manual SDK and AVD management, please use Android Studio.
echo For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
exit 1
So the right approach now, is as stated by #Shijil in his comment.
In the directory for your android sdk, you should use:
For SDK Manager:
cd tools
cd bin
./sdkmanager
For AVD Manager:
cd tools
cd bin
./avdmanager
NB For the last command in each of the options above, you will have to supply additional args depending on the operation you want to perform. An example arg that works for both is --list. Running the commands without any args will only display the possible args you could have passed.
Personally, I think using the GUI in android studio is easier. Especially for linux beginners.
Use cd /users/user/...your path.../android-sdk/tools
and then :
./android
Here is your "tools" directory for Android Studio in OS X El Captain(Yosemite also has the same path hopefully):
Users/user-name/Library/Android/sdk/tools
In the terminal, just type: Library/Android/sdk/tools
and hit enter. And you are in the tools folder.
Please note that user-name refers to the mac user
Better open terminal and type which android.
It will tell you the path where you have the package installed.
Then yeah, you just have to execute that path on the terminal.
Your android package might have been installed with Homebrew or others, so the path can be different.
Edit: typo
For me the directory was cd /Users/your_user_name/Library/Android/sdk/tools/
and after that the command was ./android list targets
I hope this can help

I want to enable backup through adb

I m new to the android. i want to do "enable backup with the following command from your SDK tools/ path: adb shell bmgr enable true"
plzz help me how to do this.
I have tried it in cmd bt it is giving me this error
C:\Program Files\Android\Android-sdk\tools>adb shell
'adb' is not recognized as an internal or external command,
operable program or batch file
//you can fine one adb_has_moved.txt in your tools folder
The adb tool has moved to platform-tools/
If you don't see this directory in your SDK,
launch the SDK and AVD Manager (execute the android tool)
and install "Android SDK Platform-tools"
Please also update your PATH environment variable to
include the platform-tools/ directory, so you can
execute adb from any location.
how to set adb path in windows:

When launching ddms from the cli OS X (10.7.3) I get an error: "Failed to get the adb version...."

When launching DDMS from the command line in Lion (10.7.3) I get the following error:
E/adb: Failed to get the adb version: Cannot run program "/Users/stevieo/android-sdk-macosx/tools/adb": error=2, No such file or directory
This makes sense to me because adb is actually in: /Users/stevieo/android-sdks/platform-tools
How can I modify this path so that ddms will launch on my system?
I have looked into the ddms file itself, but cannot decipher its intent.
One note, I do NOT have this issue on Snow Leopard (10.6.8)....
TIA for any thoughts or assistance.
Regards,
Steve O'Sullivan
If you look into your tools directory where you launched ddms, you will see the adb_has_moved.txt which says:
The adb tool has moved to platform-tools/
If you don't see this directory in your SDK,
launch the SDK and AVD Manager (execute the android tool)
and install "Android SDK Platform-tools"
Please also update your PATH environment variable to
include the platform-tools/ directory, so you can
execute adb from any location.
To solve this, I would change your ~/.bash_profile to have a line like:
# --- add Android platform-tools directory
PATH=~/android-sdks/platform-tools:$PATH
export PATH
Make sure to open up a new Terminal window so it will reload ~/.bash_profile
Note that a possible reason why it is working on your 10.6.8 installation is that you may have an older version of the Android SDK, where adb was in still in the tools directory.
If you are trying from eclipse,
Please make sure to create a adb link in /usr/bin/ directory which should solve the problem:
Ex: ln -s /Users//android-sdks/platform-tools/adb /usr/bin/adb
Note: logging as sudo/root may be required

Categories

Resources