App does not start in Genymotion - android

i have installed Genymotion recently, and everything is fine, but when I click on run icon in Android Studio, it asks to create AVD.
I want to test my app using Genymotion virtual device.

You need to install the Genymotion plugin for the IDE.
To install the Genymotion plugin for Android Studio.
In Android Studio, go to File/Settings (for Windows and Linux) or to Android Studio/Preferences (for Mac OS X)
Select Plugins and click Browse Repositories.
Right-click on Genymotion and click Download and install. To see Genymotion plugin icon, display the toolbar by clicking View > Toolbar.
Source: https://www.genymotion.com/plugins/

This guide for running app might help - Running an App in the Android Emulator.
Follow those steps, so you would be able to see the Select Deployment Target dialog.
Pay attention to the fact that your genymotion emulator should appear under the list of Connected Devices (and not under the list of Available Virtual Devices).
If you can't see your genymotion emulator on that list, please refer to this StackOverflow answer.

Have you created any virtual devices on GenyMotion. You should have a virtual device to run an app.
If you have virtual devices and they stop running on start, download Oracle VM Virtual Machine using this link I have this issue if i use the VM installed via GenyMotion. If you install VM using link, it can say VM is older but it works, otherwise it does not.

I had the same problem,
the genymotion device should be shown on the device chooser window, when clicking on 'run' icon in android studio but it doesn't...
in this link, your question is answered (but not such effective).
SOLUTION 1:
To solve this, follow the following steps.
open Genymotion app,
go to Settings -> ADB
select 'Use custom Android SDK tools'
and select location of your SDK.
the default location of sdk tools on Windows:
C:\Users\[your username]\AppData\Local\Android
tip: pay attention that 'AppData' folder might be hidden.
the default location of sdk tools on Mac:
/Users/username/Library/Android/sdk
image description for the solution 1
SOLUTION 2:
you can use a simple trick:
turn on your genymotion device (by clicking on the genymotion icon,
right of the bar and choosing your desired device)
close device chooser (On andoid studio)
open task manager(on windows ctrl + shift + esc)
pick 'process' tab
find 'adb.exe' maybe its 'adb.exe*32'
right click and select kill process tree (or End Task)
adb will again appear shortly kill its process tree again( maybe
more than one adb will be found kill all.)
then open device chooser (click run on android studio).
Bingo, your intended device is appeared.
this link leads you for more explanations
SOLUTION 3:
update your genymotion and virtualbox.(I did this but it didn't worked for me, it might be effective for you)
my suggestion is solution 2 to do!

i got the same problem
i am just new to android development even first day.
just go to menu bar and Run > Attach Debugger to Android Process than dialog after selection that option
find the process com.android.launcher and hit ok
than normally Click on Play icon to Run the Project it will Run on Genymotion

Related

Android Studio does not detect the emulator

I am a newbie in Android Studio and I can't test my programs. Before using this I succesfully tested my android programs in eclipse.
After reading some questions in similar context I created a new emulator from
Tools-android-AVD Manager
But when I run the program it says No USB devices or running emulators detected(in select deployment target). How can I fix this
Try enabling USB Debuuging in the Android emulator itself, like you would do it on a real device. Settings-> Developer options-> enable USB Debugging.
Try this in android studio menu
Tools
-->
Android
-->
Enable ADB Integration
if is is already Enabled try to disbale and reenable this works most of time for me.
Try starting the emulator before opening Android Studio.
On Mac OS, I ran into this when JAVA_HOME was set incorrectly on a new machine I had just set up.
Resolved by:
Running java --version showed a pop-up that the JDK was not installed. I clicked the More Info button which took me to a download site.
Downloaded, and extracted to ~/tools/jdk-15.0.1.jdk
In .bash_profile set JAVA_HOME with full explicit path.
thanks for Yogesh Kuma
Sometimes wipe data helped.
if emulator launched you must close emulator,
open device manager -> open menu needed emulator -> wipe data->
you can launch emulator
You need to try to find a very small fragment (small Emu rectangle right in the center of the screen) (minimized emulator window) and enlarge it in all directions :)
Save your project to git
Wipe it from your computer
clone it
Open it with android studio
This steps work for me
Go to tools->android->AVD manager->then you can see the Android virtual devices.
If you dont have any devices,at the bottom shows create virtual device button then create new Virtual device,If you face issue i'll help you !

Genymotion Device doesn't appear on Device Chooser - Android Studio

I installed Genymotion with a virtual Box and the Genymotion plugin (Android Studio), created a new device and runs properly, even from Android Studio.
However when I hit the Run button, the Genymotion device does not appear on the Device Chooser, it says 'Nothing to Show' under the 'Choose a running device' radio button. How can I get the Genymotion device to appear on the Device Chooser and run my app? Is it something I am missing from the SDK manager?
This happens because Genymotion is shipped with outdated Android tools. To solve follow the steps:
Open Genymotion app,
Go to Settings -> ADB
Select 'Use custom Android SDK tools'
And select location of your Android SDK.
On Mac with a recent version of Studio that would be:
/Users/username/Library/Android/sdk/
I had the same problem,
but I solved it.
Before running genymotion you have to first click on run and wait until project compile and show you the empty device list and then you have to start your genymotion, after that it will appear.
click the run button to compile project
device empty list appear
start genymotion
device will appear in the list
That worked for me. Hope it helps.
Got the same issue on AS 3.3.2, I tried to select location of the Android SDK, or kill / restart the server. Still they didn't work.
After that, I install the genymotion plugin in AS and open the genymotion device manager, then check the actual ip address of the active genymotion device.
adb connect device_ip_address:5555
Now the device can be detected on device chooser.
P.S. Thanks #Ismail Iqbal for pointing out that the genymotion plugin is not necessary. You can also get the ip address from the emulator header.
I also am facing the same issue in new version of Android studio. following is my routine that everyday i am doing to solve this issue:
Click Run icon to see empty list of device
Close this list
Kill adb by:
adb kill-server
Sometime you need to run this command twice.
Start adb again by:
adb start-server
Click run again. Now I will see list of my emulators but not my Genymotion that is already up and running!
I will add my Genymotion by:
adb connect 192.168.56.101
This command has to be run when select device dialog is still open.
Now everything will be OK.
On Android Studio 2 :
Click on button "Attach debugger to Android process" on Toolbar.
Click restart.
Try run again.
Goodluck.
Tools->Android-> Remove check "Enable ADB Integration"
Run your app with appeared device.( you will get an error)
Set check "Enable ADB Integration"
Run your app
You can solve it quickly.
First make sure that genymotion emulator is opend.
close device chooser (On andoid studio)
open task manager(on windows ctrl + shift + esc)
pick process tab
find adb.exe maybe its adb.exe*32
right click and select kill process tree
adb will again appear shortly kill its process tree again( maybe
more than one adb will be found kill all.)
then open device chooser (click run on android studio).
I solved mine by:
First start android studio before starting genymotion. Then run the app in android studio and wait until you see the device chooser then start genymotion
Just in case someone is still looking for an answer. The software versions in which i faced the above issuue is -
Android Studio - 3.3.2
Genymotion - 3.0.1
So, now let's start with the problem. Just try the following steps:
Check if you have enabled Genymotion Plugin in Android Studio. For Windows, go to File -> Settings -> Plugins -> Search for Genymotion and see if it is checked. If you can't find it, Click on Browse repositories , search for Genymotion and install it.
Check the tick in the plugin:
Check if the Genymotion Emulator is running or not and Genymotion Main Screen shows status as Running or ON
(This was my problem. Although my emulator was up and running but Genymotion's Status was showing Booting). It usually takes some time to get the status from Booting to ON
Check for emulator status:
Check if your Min SDK Version is less than the Emulator's SDK Version. I faced it quite a lot in my initial days. For that, Go to your Module:app gradle file and see the Min SDK Version and the Emulators SDK Version is same or higher.
Check for Min SDK Version as highlighted in the image:
Hope this helps. If you still get any problem do let me know.
When you close the device, it is no longer available to the device chooser. You need to keep running the device from Android Studio.
I tried adb kill-server/start-server. But, It didn't worked.
Instead hitting this command 2-3 times quickly worked.
adb reconnect
In my case the genymotion path was not set ..so I solved it by clicking the genymotion icon from the tool bar and enter the path (the default in windows is C:\Program Files\Genymobile\Genymotion) then after starting the emulator it now appears in android studio
First you will have to run the genymotion from the android studio by pressing the genymotion icon after genymotion starts then press the run button, you will see the genymotion device option on deployment target dialog box.
In addition to the answers of this question :
My problem was about windows viruses , Last days i turned off my windows defender and i have't any other antivirus software in my system .
My SDK folder was full of virus , when i scanned Many viruses detected .
After removing viruses from my PC i had to remove SDK completely and download it again .
Finally notice that : For any reason , if the SDK files are
damaged may cause this error .
Now the problem is solved .
For This Problem:
Go to Project structure/project
In project SDK select simulator API version.
Done. Now your genydevice is added in the list.
I've tried from the android studio version 2.0 and the version 2.1, both does not compitable to genymotion. please use the version 1.5.1 or older than that.

App not run in visual studio emulator for android in visual studio 2015

I create blank xamarin android project without add any code when i debug this project debugging without problem but when i run app with visual studio emulator for android emulator is running but not starting my app and deploy failed and don't show me error
why ?
please help me
I had the same issue. VS 2015 can launch the VS emulator but can't deploy the app.
I was able to solve the issue like this:
Launch the emulator (F5 in VS, then cancel the deployment using the Build/Cancel menu)
Click on the chevron icon (») in the toolbar to the right of the emulator
Select the Network tab
Locate the preferred network ip address
Back in VS, click on the Open Adb Command Prompt toolbar button
Type adb connect [the emulator ip address]
Press F5 again in VS
Looks like a VS bug to me.
I had the same issue. It turned out the root cause was that the VS Emulator couldn't find adb.exe.
When that happens it won't connect to the emulator unless you do the manual connection following the steps CSharpRocks gives. The emulator also won't be listed under "adb devices".
The fix for me was to reinstall the Android SDK, using the Windows EXE based installer (not the zip installer). The EXE installer sets the HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools key, Path value, in the registry, pointing to the Android SDK root directory.
The VS Emulator uses that registry setting (or the Android Studio install registry setting) to find the SDK, assuming you didn't install the Android SDK with Visual Studio itself. With that, it should be able to find adb.exe and work.
Have a look here:
Xamarin Forms Android App Crashes Running Debug with VS Android Emulator
Start the Hyper-V manager
Select the emulator you are trying to use
Right-click, hit settings
Click processor
Click Compatibility
Set checkbox “Migrate to a physical computer with a different processor version”
I'm having a very similar issue. I have found two different kind-of-work-arounds, but have not yet figured out a full solution.
Start the emulator before trying to deploy to it
Launch the Visual Studio Emulator for Android application from the start menu.
Launch one of the available emulators via the green arrow
Attempt to again launch your application from visual studio, selecting the VS Emulator N-inch... emulator from the drop down menu
For me for some reason the app still doesn't "launch" on the emulator, although it is installed. So I have to open the application menu and select my app. Additionally it will usually crash the first several times I try to open it, but eventually displays my single default label, Welcome to Xamarin Forms!.
Run the application in Ad-Hoc mode
Before running the application, change the solution configuration (from the top toolbar next to the green "run" button) to Ad-Hoc.
The problem with both of these methods though is that I'm still not able to actually debug an application. I can run it, but my breakpoints are ignored and I think that will make finding bugs difficult once I actually start to write a real application.
I hope to update this answer once I figure out an actual solution.
I had the same problem yesterday. The problem appeared (probably) because I tried to start development after a long break. I updated VS and everything, but faced many issues.
Eventually you need to start fresh
Make sure SDK for emulator points to the right place (HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools)
Run Visual Studio with Administrator privileges
Go to Hyper-V Manager and delete ALL Virtual Switches - let the system recreate them when needed. It will do it properly
Delete all existing emulators and recreate them in Visual Studio. I even found a comment to name them without spaces - not sure if it is needed, but wouldn't hurt.
Doing all this helped me. But I was on the verge of reinstalling Windows 10 clean. I think lots of things and configuration changed and are no longer compatible.
Try it enabling Hyper-V and using a Visual Studio Emulator from android; that worked for me after a lot of attempts and research
I had the same issue but in my case it was not the registry. After doing a release build, I deployed the app to the emulator device in release mode which pushes the app to the device and then effectively "disconnects". This leaves a version of the app on the device which seems to block further attempts at debugging or deploying.
I solved it by starting the emulator, going to "settings -> apps" and manually uninstalling my app. Then the next debug build & deploy worked again.
You could probably also manually start the emulator and say "wipe device" option so it starts fresh.
In VS2017, on a Windows10 machine, all I had to do to get the app to show up was turn off Mobile Data.
(swipe down or use settings, then click Mobile Data and confirm to turn it off).
After I turned it back on, I could access the app. Before doing this, it always seemed that the emulator ran, but wouldn't run the app.
... no idea why this worked, but I'm posting it here in case it helps someone.
During my troubleshooting process, I also looked at these articles:
VS Android Emulator wont run application
Troubleshooting the Visual Studio Emulator for Android
Update Your Path For The New Android Emulator Location
Install apache in VS 2015 here.
Visual studio requires apache to develop android apps.
You also may want to look at some other suggestions:
notshowing, troubleshooting
I had such issues before with the android SDK emulator, now I'm using Genymotion emulator instead of it, it is more light and faster and will be detected automatically by you VS once launched.
you can download the free version from here : https://www.genymotion.com/
and also you can download any device emulator.

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

Android Studio doesn't see genymotion

I updated 0.5 to 0.8.14 version of android studio , but now studio doesn't see genymotion , what I must do now ? Thanks for all .
Edit :I solved the problem by updating genymotion too
Genymotion by default uses it's own ADB binary. If it has a different version than the one Android Studio is using, they can conflict and you get lots of issues. One of them can be Genymotion not being detected, and problems deploying apps.
I would recommend setting Genymotion to use the ADB/Android SDK that Android Studio is also using, instead of using the default one. That way you will avoid conflicts on future updates.
You MUST install the plug-in for Genymotion first, click the "File" tab locate the "Plug-in" option, down the bottom, search for Genymotion, then install. After the installation, you need to restart Android Studio, after that, you will see the Genymotion icon near the "Sdk Manager" icon, click on it, then just specify the location of your Genymotion installation. Also, make sure you have "Oracle Virtual Box" installed in order to use Genymotion, it is a requirement.
Edit-
Then your genymotion virtual machines come up, click the one you want (I think it has to be off for start to be clickable/not greyed) then click start,
then click that green Play icon near the centre of the button bar below the menu bar, then the genymotion virtual machine should appear listed under 'running devices'. highlight it and click ok, and it should launch and show your program.
Open Genymotion Shell,use command line devices list will show the then in cmd use command line adb connect IP address.if not show devices in studio.maybe restart studio.
One words(you need find your devices ip):
adb connect 192.168.***.***:5555
2019-03-19 09:10:00
My enviroment:
Ubuntu 18.04
Genymotion Version 3.0.1
Android Debug Bridge version 1.0.40
AndroidStudio version 3.3.2
My problem:
adb devices : list is empty
no usb devices or running emulators detected
My solution :
cd /opt/genymobile/genymotion
./genymotion-shell
devices list (if no running devices start one)
in other terminal run commond : adb connect yourDeviceIP:5555
Reference:
https://stackoverflow.com/a/27262302/7707781
https://stackoverflow.com/a/24926960/7707781
I had the same problem, I close genymotion, then clicked on Run button , so the "Select Deploymnt Target" dialog opened. after that I open genymotion as administrator, start virtual device and after a minute it appear in "Select Deploymnt Target" dialog.
I think the key point is that genymotion has to be run after android studio, and maybe with "Select Deploymnt Target" dialog has to be opened!
It works for me anyway
After few research I found a solution, open task bar and just End Process the adb.exe, hit run (android studio) and adb will be recreated and your genymotion emulator will be on the list. Thumbs up
When I updated Android Studio to 3.4, same problem is occured in my system.
Open Genymotion program,
Click "Genymotion" text on the upper left corner,
"Settings" --> "ADB" --> check "Use Genymotion Android Tools (default)"
Restart Genymotion program.
Go to Genymotion → Setting → ADB → Use Custom Android SDK tools
(C:\Users\{username}\AppData\Local\Android\Sdk).
Go to Android Studio → Search for "Genymotion Device Manager" → Specific the part for Genymotion (C:\Program Files\Genymobile\Genymotion).
Go to Android Studio → View → Appearent → Toolbar.
first install genymotion plugin and restart and android studio.After the restart you will see genymotion device manager icon near sdk manager icon select it and add the path where u have genymotion folder.If u didn't see the icon then search for genymotion device manager u will get it
I have faced this problem once. I must connect it to adb server manually and it worked fine!
just follow these steps:
1- open your emulator
2- after running, open oracle vm virualBox manager app
3- double click on your running emulator. you will see Ip management value. that's the emulator local ip address
4- go to your sdk manager path, then platform-tools directory
5- open cmd on this directory (or use cd command)
6- run adb connet ipAddress:5555
after that you will see connected to ip address text on the screen. go back to android studio and you see adb has appeared!

Categories

Resources