When i enter "adb install asdasd.apk" to cmd returns "error:device not found". How can I fix this?
Just copy that apk file into ( D:\android-sdk\platform-tools ) android sdk platform tools.
and then open the cmd prompt.
then, come into that platform tools path in cmd prompt.
then, give like this in cmd -- adb install (appName).apk
wait few minutes and get success respomse in cmd prompt..
First, familiarize yourself with a concept of AVD. That's basically an instance of the emulator - it has a bunch of settings, like the Android version to use and screen size and an SD card image.
You cannot install stuff "in the emulator" - you can only install stuff into a specific AVD. For that, you need to create and run an AVD first. For that, use "AVD Manager" from Eclipse or standalone.
Under the Android SDK folder in Explorer, run "AVD Manager". Choose an AVD (or create a new one if you don't have any). Select, click "Start".
Does the emulator show up when you run the following command?
adb devices
If not, you might have to boot up the AVD first, but if I remember correctly it should be starting it up by itself.
Have you created a new emulator for your project? And are you using Eclipse? Eclipse has an ADT plugin which is useful as it allows you to open the AVD manager through it. This plugin will give you this option in the Windows tool bar of Eclipse: Windows>AVD manager.
Create a new project based on the emulator and click the run button which will install your project onto the emulator. If you have an Android device I recommend turning USB development mode in your phones settings and running your project straight onto your device as it will be a lot faster. Hope this helps
this is what i did :
first run the "AVD Manager"-> choose an AVD -> click "Start"
immediately after
you click on "Start"
use command on cmd as,
adb install asdasd.apk
then in my case (Windows), asked to place .apk file in data/local/tmp/
what i did was copy and paste .apk file into data/local/tmp
and again use command
adb install asdasd.apk
then cmd prompted-> Success
You can also use command
adb devices
command for check whether emulator is in the list
Actually you may need to run AVD several times
Related
I tried testing my app on Android Studio but I was getting stuck at
"waiting for AVD to come online..."
I've read resetting adb from Android Device Monitor will do it, and it did...
for 1 test, when I've restarted my PC the next day I'm getting not only:
"waiting for AVD to come online..."
but also
"Could not automatically detect an ADB binary." error every time I try testing my app.
Maybe worth mentioning when I did that 1 test, I was also getting the
"Could not automatically detect an ADB binary."
error, but at least it worked.
Just open the emulator and click on the three dots on the last of the toolbar line, the other page will open then go to setting, then there is the the option "USE DETECTED ABD LOCATION" just off that than the option will come click on that and select adb.exe the location of adb.exe is go to your main disk location example my main disk location is C:\ just select your own disk where your windows, mac, linus is installed,then go to users, then AppData, then Local, then Android then select sdk then platform-tool and select adb.exe then click ok
From my experience this is because the AVD can't detect your ADB binary. When you launch the AVD if you go into settings, it's the '...' symbol on the toolbar of the virtual machine, then go to the 'Settings' section there should be an option called 'Use detected ADB location' switch this off then select the location of your adb binary. In Linux you can do this by typing the command:
which adb
Select the location shown in the settings. Once you've done that the error should stop appearing.
This error because android studio did not find adb.exe in SDK\platform-tools folder. Maybe this is caused by sdkmanager while trying to update current packages.
Any way, the easiest way to fix this error is by downloading SDK Platform Tools as zip file from https://developer.android.com/studio/releases/platform-tools.html , unzip it and replace the current platform-tools folder in SDK folder.
go to ..\AppData\Local\Android\Sdk\platform-tools and reinstall your ADB, i guess this happens on ADB 32 in an system 64bits
Go and check your sdk/platform-tools, is adb there? If not Open SDK manager and download Android platform tools, contains adb.
After that try once again, for me this works
On my device (Windows 10 x64) it is located at:
C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe
Click on the ... in the emulator and click on settings -> "User detected ABD location" will be switched on. Change it to off and browse the location of adb.exe under platform tools.
download platform-tools from :
https://developer.android.com/studio/releases/platform-tools
Extract files and
copy platform-tools folder to location :
C:\Users\User-Name\AppData\Local\Android\Sdk
overwrite all files
I've tried for days and failed to run AVD on my PC. So I decided to look for an alternative and found out that Youwave can be used as an emulator. Here is my question: How can I run Android source (apps not finished so they are not .apk) on Youwave?
You can't run Android Source which is not finished to become .apk.
The best alternative of emulator is Genymotion.
hopefully it would be useful for others that reach this page through googling,
run command prompt in windows by typing "cmd" in the search field of the start menu
change the directory to "platform-tools" in your sdk folder. For example, suppose that your sdk is located in "c:\android\source\sdk\" use the command "cd\android\source\sdk\platform-tools" for changing the current directory.
Run the following command for connecting YouWave to AndroidStudio:
"adb connect 127.0.0.1:5558"
Enjoy it!
For some reason, I cannot create an AVD. I went through AVD Manager - Cannot Create Android Virtual Device and attempted the solutions, and I also fiddled with the different settings in the manager, including changing the name to Device. I made sure that the system images are installed, and I followed the instructions for using the Intel Atom. Why is the OK greyed out?
I even ran the AVD Manager from eclipse, from the exe, and from monitor.bat
For reference, I did install the Atom's image:
For some reason, running the AVD via command line worked, but I couldn't check Use Host GPU. Thanks to Rusher who got this from https://stackoverflow.com/a/22213144/1896169 . See Running Your App | Android Developers for instructions on running via command line:
From the command line, change directories to <sdk>/tools/ and execute:
android avd
In other words, typing this into command line should work:
cd whateverThePathToYourSDKIs/tools/
android avd
You can only use either Snapshot or Host GPU.
Snapshot or Host GPU they can not be used simultaneously.
now try to start avd from avd manager.
I followed the instruction on this tutorial How do you install an APK file in the Android emulator? but it doesnt install the apk. instead, it gives me this message "adb is not recognized as an internal or external command"
i think the problem here is im using a portable adt plugin and also a portable eclipse. is there anyway to install a downloaded apk file in my portable emulator?
go to your platform-tools folder from your android sdk dir and try in cmd promt
adb -e install c:/Projectapk_folder/yourapk.apk
Note: Emulator is in running mode.
EDIT: type adb command and check
C:\android-sdk-windows\platform-tools>adb devices
List of devices attached
0A3AAD40xxxx2F device
Just try this solution....
Click emulator Setting Click Apps First uninstall your app and again install
I finally found the answer. Yay! :) See this
The easiest way ever
1- First play the emulator from AVD manager
2- Just drag the .apk file and drop on the emulator screen
I tried on mac and it works well
I have read a few articles that BlueStacks App Player can be used to debug android apps via Eclipse, instead of the default android emulator.
Example article
But I think this refers to the Windows version, I was unable to get to it work on MacOS. Does anyone know how to debug using BlueStacks/eclipse on MAC?
adb connect localhost:10001
should do the trick.
Well, you can try another way:
1) First, open the DDMS via Window->Open Perspective->DDMS under Eclipse.
2) Then open BlueStacks App Player.(leave it opens)
3) After that switch back to Eclipse and you should notice there're two emulator under the Device tab.
Then click Reset adb under the small triangle at the Device tab.
After a few seconds, the another one emulator will disappear and you can proceed to the next step.
4) Then return back through Window->Open Perspective->Java under Eclipse.
5) Select your project and right click on it, choose Debug As->Debug Configurations
6) Under Android Application select your configuration or create a new one. On the Target tab choose Always prompt to pick deviceAfter this, select Apply then Debug.
7) Then select BlueStacks emulator in the prompt window, and finally select OK.
Alternatively, you can also open the BlueStacks App Player before Eclipse using the above steps(with minor changes).
For more info, visit the below links.(However, in Chinese...)
http://www.cnblogs.com/hbbbs/archive/2012/10/30/2746950.html
http://www.cnblogs.com/hbbbs/archive/2012/10/30/2746979.html
Hopefully this will help you.
C:\>cd Program Files (x86)\Android\android-sdk\platform-tools
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb connect 127.0.0.1:5555
connected to 127.0.0.1:5555
C:\Program Files (x86)\Android\android-sdk\platform-tools>
Run Bluestacks.
open Command Prompt in Windows.
Go to Platform-tools using following command.
cd C:\Users\<username>\AppData\Local\Android\sdk\platform-tools
then write:
adb devices
With SDK tools 27 and later!
You get a list of devices detected by adb .. if BlueStacks-4 is installed you should see the device listed (emulator-555x).
For Mac users: localhost:5037 worked for me
BlueStacks bundles its own copy of adb, %PROGRAMFILES(x86)%\BlueStacks\HD-adb.exe. You can connect localhost with it, or any other command. BlueStacks 3 uses the default port 5555.