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!
Related
I've started react native programming recently, I use WebStorm for coding, I always have to run Android Studio and start my Android Virtual Device and then Close Android Studio and work with WebStorm and run and test my react native app.
how can I run my Android Virtual Device from webstorm without the need to open Android Studio?
solution
Finally, with the help of "Martin Zeitler", I succeeded in doing this in the following way:
In webstorm select File>settings, in search bar type "External Tools" select "External Tools", in "tools" section click on plus icon (add) fill this window like my parameter:
Name: android avd
*as you like
Program: C:\Users(your user name)\AppData\Local\Android\Sdk\emulator\emulator.exe
*this is your emulator.exe address and this is the default address, you have to replace (your user name) with your system user name or change the address for locating to your emulator.exe address
Arguments: -avd Nexus_5X_API_23
*Nexus_5X_API_23 is a sample you have to type your emulator name that you create it before in android studio
Working directory: C:\Users(your user name)\AppData\Local\Android\Sdk\emulator
*like Program address but without emulator.exe
click ok
now in webstorm in tools menu in External Tools section you can find android avd or your custom name. by click on it you can run your emulator from webstorm.
finally you don't need android studio at all , you can run it from webstorm.
it might be easier to explain with a screenshot ...
except that for Windows™ you'd have to use a .bat batch script, instead of .sh shell script
the shell script, which is being used in the example, can be found here.
it does a little more than just start the emulator and is for Linux only.
(just to provide an idea, what can be done in the given situation).
here it is explained:
Start the emulator from the command line.
No, WebStorm provides no Android support and there are no plugins you can use to run android virtual devices within Webstorm.
Although you can run android emulator from terminal without using Android studio.
For example on Windows, you can use the following from the command prompt:
start "" C:\Users\qasim\AppData\Local\Android\Sdk\emulator\emulator.exe #Pixel_XL_API_28
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 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.
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
When I want to test an android application, I create a new AVD, start it in the emulator, wait for the emulator to finish booting, and then use ADB to install the application, and when I'm done delete the AVD. Are there any tools that automate all of those steps? I tried writing my own but I couldn't find a way to tell if the emulator was completely booted, as the Android SDK website says not to use "adb wait-for-device install file.apk".
You're right not to use wait-for-device. It does not wait for the package manager to be available, which is what you need. I'm not sure how eclipse does it but you can poll the emulator until the package manager is available using the command adb shell pm path android. The command should return 'package: something'. Check out this python script that uses the technique: www.netmite.com/android/mydroid/1.6/.../adb_interface.py. It's pretty big but if you search for the command above you'll find the relevant piece of the script.
Why do you want to delete the AVD every time?
If you are deleting it every time because the install command throws an error due to the app already existing on the AVD, you can do this: adb install -r file.apk. The -r part is used for reinstalling the app. Here is the full usage instructions for adb.
Are you deleting it to remove the application you are testing and revert to a 'clean' emulator? If so it's not necessary to delete the AVD every time. You can specify the -wipe-data option when starting the emulator. This effectively resets the AVD to how it was when you created it. Here is the emulator documentation.
Hopefully that helps simplify your script.