Unable to deploy to Genymotion device through Android Studio - android

I'm currently using Genymotion with Android Studio via the Genymotion plugin to try to test and debug my Android applications. I set up the Android Studio Genymotion plugin a while ago, and it worked. However, just now I tried to deploy my application to Genymotion, but after starting my Genymotion device, it did not appear in the ADB deployment list. I have no idea what happened or why. Does anyone have any idea?
By the way, this means I cannot test my application, as I cannot use the regular ADB virtual device set as per this other continuing issue: How to create an Android AVD without HAXM?
Thanks!

It is potentially an incompatibility problem between the adb shipped with Genymotion and the one from your Android SDK.
Turn all your Genymotion devices off.
Then open Genymotion application (not the IDE plugin), go to settings > adb tab > check "use custom adb" and set the path to yout Android SDK.
Then reopen a device and you should see it on your IDE.

Related

Android studio cannot find the virtual device of genymotion

I have created a virtual device by genymotion, but android studio is unable to find the device.
I have started the device by virtual box. I also tried killing the adb server. But none of the things worked.
This might be due to the fact that you haven't installed genymotion plugin properly. So you need to install this plugin in Plugin section of Android Studio.
1) Start a device from geynymotion.
2) Click on Run-> Edit Configuration in Android Studio.
Genymotion's device will be available now.

How to develop android apps with xamarin without hyper v and emulator

I am using windows 10 home and visual studio 2017. I want to develop android apps with xamarin. Hyper-V feature is not available on windows 10 home and I can not afford pro version, So emulator is not installing without hyper-v.
What should I do to develop android app?
Have anybody idea to deploy android app without using emulator and hyper-v?
Thank you in advance!
It's possible to develop Xamarin app without using the emulators. But in that case you'll need to have an Android device to deploy your app on.
Setup Android SDK Manager on your system. Although Xamarin includes a
SDK Manager, you can download it from the following link. Android SDK Manager download
Setup the ADB (Android Debug Bridge) on your system (install Google USB Drivers)
Connect your Android device to the system after you enable USB Debugging(Developer options) on it. Once the device is connected it will give you a prompt to enable debugging. Tap yes and you'll see the option to build to your device as shown in image.
You can try to use any avaliable on windows android emulator. I like to use Bluestack (https://www.bluestacks.com), the steps for use it below:
Install Bluestacks emulator
Launch emulator and wait for load finished
It's your wellcome screen, your application and apps from store will be here
Go to settings > Preferences and check "Enable android debug bridge (ADB)" + "Enable Android input debugging"
One time Setup finished
"Open android adb command promt" and type
adb connect 127.0.0.1:5555
If you have done everything good you will be connected to emulator and ready to debug your application
Good luck!
UPDATE:
As of visual studio 2019, non-hyper v emulation has been stopped.
Old Answer
I am very positive that at the time of VS installation the Visual studio emulators for Android are readily available for download and use, there you can find a good amount of android emulators also it provides you with Android SDK which again can be used to create Android emulators without using Hyper-V
The below link contains all you need to know about Visual studio emulators including on how to install :
https://msdn.microsoft.com/en-us/library/mt228279.aspx
Hope this Answers your question.
Goodluck!

How to use a different emulator in Android Studio

I have issues with the build in qemu emulator in Android Studio. There are some other Android emulators out there. How to configure Android Studio to use a different emulator? I use leapdroid emulator http://www.leapdroid.com to run apps and games.
Leapdroid is compatible with Android adb, i.e., using the same port numbers starting with 5555, so there is really nothing special to do, pretty much same as what you do with the built-in Android emulator. If you run "adb devices", you will see a device named as "emulator-5554".
Here are the steps:
Launch Leapdroid vm, which contains android 4.4.4 image
Launch Android Studio, and click Android emulator tab, a device named as "Emulator unknown 4.4.4" will show up inside the device list, and you can select it.
You should be able to see the logcat, and debug your Android app, etc.
Make sure that you close all other emulators first, in case there are conflicts.
I've also attached two screenshots for clarifications:
There are options like:
Genymotion: https://www.genymotion.com/
config with Androi Studio here
Visual Studio Emulator for Android
https://www.visualstudio.com/en-us/features/msft-android-emulator-vs.aspx
config with Android Studio here
I hope this help you
Did you try using Genymotion? It is the fastest emulator I've come across.
-Download it from their website for your required system specifications.
-You will also need an account to download the device images.
-Once all that is done, when you simply run the emulator, the device should show up in your ADB choose device window.
-You may also want to use Genymotion plugin for android studio for easy launch of virtual devices.

Android studio: emulator is running but not showing up in Run App "choose a running device"

I have launched my emulator via the AVD manager and once it's running I have clicked on run app. I have waited a couple of minutes for my running device to show up in choose a running device but the window always stays blank.
Probably the project you are running is not compatible (API version/Hardware requirements) with the emulator settings. Check in your build.gradle file if the targetSDK and minimumSdk version is lower or equal to the sdk version of your Emulator.
You should also uncheck Tools > Android > Enable ADB Integration
If your case is different then restart your Android Studio and run the emulator again.
This thread helped me to solve my problem, in particular this answer:
In Android Studio go to Menu -> Tools
Android
Uncheck Enable ADB Integration
Had similar issue with my emulator.
Solved by Wiping Data of emulator
Tool > ABD Manager > Down arrow under Action Wipe Data
Note : This is remove all data inside emulator.
For anyone else having the issue - none of the answers provided worked for me.
My case may be different to others but I had Android Studio installed first which installs the SDK by default to: C:\Users\[user]\AppData\Local\Android\sdk. We then decided to use Xamarin for our projects, so Xamarin was installed and installed an additional SDK by default, located here: C:\Program Files (x86)\Android\android-sdk.
Changing Xamarin to match the same SDK path worked for me which I did in the registry (although through the VS settings I'd guess it's the same):
\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools\Path
Change the path to match the Android Studio SDK path, close everything, start the VS Emulator, run Android Studio, ensure ADB integration is off and try. It worked for me.
If you uncheck the ADB Integration, you cannot use the debug any more.You may just restart the adb server, run
$adb kill-server
$adb start-server
in Terminal to restart the adb server without restarting the Android Studio. Then the emulator shows up.
My emulator used to suddenly disappear but the app still continues to run.
Solution-
Open task manager and kill qemu-system (Under Android Studio). This will stop the emulator. Then restart emulator.
Your adb connection is broken.
close eclipse
open cmd-prompt type adb kill-server then adb start-server
reopen eclipse
run the project!
Wipe the data of your Android virtual Device and then start the emulator. Works for me.
I had the same issue on a brand new computer, and the reason was simple. Although I downloaded and unzipped the Android SDK, I didn't add it to the PATH. So:
On Windows, you have to launch envvar and there, add the path to your android/platform-tools
On MacOS, edit the .zshrc file in your home, and add
export PATH="$PATH:/your/own/path/to/android/platform-tools"
This answer is not proposing a solution. Just a workaround in case someone is looking
I am using Idea based Android Studio (some people are talking about eclipse one here)
When I launch the app in the emulator (using the Run App button of Android Studio) AVD shows up but the app does not launch or run.
However when I connect my mobile and launch the app on my mobile the App works (this itself took some time, enabling developer options on mobile and doing the right configuration)
Because My app is launching on connected mobile, I can say nothing wrong with App.
There is some problem with AVD integration which I could not figure out so As of now I am working around my problem following way.
1 - I installed the app manually by dragging the APK file on AVD. (APK file is app\build\outputs\apk\debug folder)
2 - Then my AVD was not showing the installed APP list.
3 - I searched my APP using Google bar on AVD and dragged the APP icon on the home screen of AVD.
4 - I can now launch the APP using my APP icon on the home screen of AVD.
**That's how I am working around my problem. **
I have verified that Run App Icon does install the Application. Installation, not launching, appears to be the problem for me.
try to open the emulator and run it parallel with android studio/eclipse and the option will be displayed to select in the choose the device(emuator name, mine is Genymotion).
Check the android path of the emulator.
I had to change the registry in here:
HKEY_LOCAL_MACHINE > SOFTWARE > WOW6432Node > Android SDK Tools
to the actual path of the sdk location (which can be found in android studio: settings-> System Settings -> Android SDK)
All the credit goes to the author of this blogpost www.clearlyagileinc.com/
start device from genymotion button (have to install genymotion before and setup genymotion folder location on settings)
run application
choose genymotion running device
in your device you want to run app on
Go to settings
About device >> Build number triple clicks or more
and back to settings you will found "Developer options" appear
go to and click on "USB debugging"
Done

Intellij can't run app on Genymotion(but can start it)

I tried to use genymotion instead of emulator.But after installing the genymotion and intellij plugin,I found that I can't run app on the genymotion.The target devices which I choose is"Show chooser dialog" but there is no genymotion even I can start the genymotion with the plugin.
The version of intellij is 12.1.4,and the genymotion is 1.1.0.
I just resolve the same problem as you have encountered.
First, close Genymotion relate application / emulator
Second, uninstall Genymotion plugin for IntelliJ
Third, install Genymotion plugin for IntelliJ
At last, start Genymotion emulator, then bring up adb console, type adb devices to see if your device is listed.
If the answer is yes, go to IntelliJ and run the application with the Target Device option set to >Show chooser dialog.
You should be able to see your Genymotion emulator in the running device list now.
Hope it helps.
(Installed IntelliJ12 on Win7)
http://i.stack.imgur.com/XJ2Ru.png << see this image
I set it in Choose process, and choose ip of genymotion device and it will show in adb device when run
i use intellij idea 12.1.6 and genymotion 1.3.0

Categories

Resources