I'm using Linux (fedora 16). I try to install Android SDK and ADT. Each time I want to run Android SDK or Android Emulator, I must run from Eclipse, but I don't know how run directly. (don't need to open Eclipse)
In Windows, in AndroidSDK folder has file exe so you can run directly such as AVD Manager.exe or SDK Manager.exe but not in Linux.
Please help me about this issue.
Thanks :)
You can launch android SDK manager by simply moving to android-sdk/tools folder and using the following command:
./android &
To launch the emulator, from the same folder you need to execute the following command:
./emulator -avd youravdname
It's better to store Android SDK in /opt/ and just run:
$ sudo /opt/android-sdk-linux/tools/android
You can add & at end to run it as background process.
try using the following commands , this should work if you have installed the sdk correctly
Open a terminal
su
input your password
cd Android/SDK/tools (enter)
./emulator -noaudio #android_dev
Related
I tried to develop app using Flutter(using Android studio IDE).Add flutter plugin & flutter SDK in studio and Everything is configured but emulator / real time device are not listed. Its shows error like "Unable to list devices: Unable to discover Android devices. Please run "flutter doctor" to diagnose potential issues"
Ref link : https://flutter.io/setup-windows/#android-setup
https://flutter.io/get-started/test-drive/#androidsstudio
configure flutter in terminal to detect Android SDK and Android Studio:
$ flutter config --android-sdk /path/to/android/sdk
$ flutter config --android-studio-dir /path/to/android/studio
then restart Android Studio/Intellij.
source: https://github.com/flutter/flutter-intellij/issues/2113#issuecomment-383412308
If you configure flutter and android sdk both perfectly and you do not show the avd device list in android studio.
It's very simple way to show android emulator device list.
First create a new Android Emulator if already create you run the AVD manager then you can show the instead of emulator name
Before:
https://i.stack.imgur.com/6np0m.png
After:
https://i.stack.imgur.com/fiCYe.png
May be there is no AVD's to list down. And if emulator runnig, intelliJ will grab it.
In Android Studio, you can create a AVD using AVD Manager or using Terminal. Here is how you can do that using Terminal,
First, go to the android sdk installed directory -> tools
and copy the path and in the terminal type cd and paste the path and press enter. Now yo are in the tools directory.
Next, using terminal type:
emulator -list-avds - to list created AVD's(You should be in tools directory to run this command).
If there is a device type emulator -avd <name>. else you can create a one:
type cd bin then,
Use:
avdmanager create avd -n name -k "sdk_id" [-c {path|size}] [-f] [-p path]
As a example:
avdmanager create avd -n Nexus -d 23 -k system-images;android-23;google_apis;x86
Then again go back to tools directory by typing cd .. and type emulator -list-avds. This command will list your created AVD.
To run a AVD type:
emulator -avd <name>
About AVD.
Had the same problem after moving avd's to another disk.
I managed to solve by making ANDROID_HOME system variable to point to the android sdk path.
For mac users,
It was working fine yesterday. In my case I had this in .bash_profile
ANDROID_HOME = Library/Android/sdk
I changed it to,
ANDROID_HOME = /Users/rana.singh/Library/Android/sdk
.bash_profile has
export ANDROID_HOME=/Users/rana.singh/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
It worked.
I need to do somethings that must be done from the command prompt of the android tool.
but every one says it's in the platform tools folder in the sdk path but which file is it?
that might help:
the contents of platform tools folder:
aapt.exe
adb.exe
aidl.exe
dexdump.exe
dx.bat
fastboot.exe
llvm-rs-cc.exe
source.properties
AdbWinApi.dll
AdbWinUsbApi.dll
Did you mean android Adb command lin tool if so see this link
if you want to manage emulator from command line see these three link it will help you a lot
Android Emulator
Using the Android Emulator
Android Emulator on Linux
There is an android command, but it's not an executable - run the android.bat in the tools directory, and you should be able to make the changes you need. If you add the tools directory to your system path, you'll be able to run android from any directory when using the command line.
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
I'm running Fedora 16 x64 with xfce desktop. Installation of Android Developer Tools (adt plugin) was successfull from Eclipse. I can even run an Emulator. It's just that adb command is not working from the Linux command line. Even if I cd to the platform-tools folder and run adb devices I get this output:
bash: adb: command not found
Eclipse also reports an error about this. By the way adb file is marked as executable. Any help would be great...
I think the problem was already addressed here:
Problem with Android SDK on Fedora 14 with Eclipse
and here
Android SDK on a 64-bit linux machine
Please let me know.
adb is located under folder platform-tools and in order to run it you have 2 options.
Option 1: Add the SDK/platform-tools folder into your shell PATH (BASH I guess)
Option 2: go under the platform-tools folder and run it using: ./adb
for instance ./adb logcat
Cheers
sudo yum install android-tools -y
Can I run an APK file in the Android emulator? I have to look at the UI design of an application, but only the apk is provided.
Assuming you have an emulator created and started (which you can do with the AVD manager,) you can install an apk by running:
adb install WhateverApp.apk
from the terminal. The adb command comes with the SDK and is under platform-tools/. Then just run it in the emulator.
Yes you can run apk in the emulator . for that you need to install apk in emulator ..
Steps To Install APK in Emulator
Open Command Prompt
Now Go to tools or platform-tools . Ex(E:\android-sdk\tools)
Then type this command adb install [apk file name whenever it stored]