Start my application on genymotion - android

I have just installed genymotions, but when I try to start my app on it, as described at the end of this paragraph, eclipse starts the old emulator even if the new one(genymotion) is running. I tried to change the debug configuration but the only virtual devices that I can see in target are the old emulators(see the photo below).
If in target i follow this answer, I get the following error :
[2014-01-30 19:50:00 - HelloWorld] No active compatible AVD's or devices found. Relaunch this configuration after connecting a device or starting an AVD.
Moreover I followed the FAQs that suggests how to bing the SDK. I show my configuration in the second photo.
The devices shown in the photo are all made with AVD, there aren't the one of genymotion and neither the one that is running:
Here I put the configurations of genymotion:
How can I say to eclipse to start the genymotion emulator and not the AVD one?

Looking at your screenshot I think you should unselect all the AVDs displayed on the list. The option you chose launches the best selected AVD by default, and optionally a device.
Also, the Genymotion instances are considered as real devices by ADB and ADT. So, as GhostDerfel mentioned, you need to run one of them before running your app on Genymotion instance.
To know all the detected devices by ADB you can look at the "Devices" section of DDMS. If a Genymotion device is detected, it should show a name like this : genymotion-galaxy_s3....
You can also run this command adb devices. The result should show something like this:
List of devices attached
192.168.56.102:5555 device
Each Genymotion machine is listed by its local IP address here.
If you can't find your Genymotion instance(s), check that you have the lastest version of Genymotion. A ADB detection bug has been fixed on the release 2.0.2

I had the same problem, i solved it by closing Genymotion and starting it from Genymotion Virtual Device Manager in Eclipse

i also had this problem and all tried all the above solutions and still was not working.but finally i read in the genymotion manual that u can simply drag and drop ur apk to the device and it will load and run.so i tried that and not only it worked it also seemed to solve the path problem also so that when ever i run the project it will automatically detect my device created by genymotion.

I can resolve by connecting a real device one time.

You need to install the genymotion plugin. In android studio File>Settings>Plugins>Browse Repositories > install genymotion plugin. once installed a genymotion button should appear in android studio.I hope that helpfull for you.

Related

Genymotion Virtual Device Appears to be Running but Appears to be Stuck on Booting

I'm currently having a problem with my Genymotion Virtual Device where I'm able to boot up an emulator, (when it opens up,) and it responds to swipes or opens up app, but the status of the device shows that the device is stuck on booting.
Screenshot:
When I check with "adb devices" it doesn't show up as an active device. I've attempted to reinstall Genymotion and VirtualBox, as well as create a new virtual devices, but it doesn't appear to get rid of the issue. I'm not sure what to look for or what to adjust to get Genymotion working again. Vitrual Box and Android SDK directory appear correct.
I face this problem several time and i didn't find any solution until now.
I update Genymotion to version 3.0.2 and now work fine.
As in release note says
We have fixed an incompatibility with the adb tool bundled in the platform-tools 28.0.2 package of the Android SDK, which caused failures to start virtual devices.
This new version of adb changed the behavior of the “adb connect
:” command by making the “port” part mandatory. This
broke Genymotion Desktop in a few places where it did not pass the
port. We have adjusted the way we call “adb connect” and also updated
the version we ship with the product to match the one in
platform-tools 28.0.2.
Source www.genymotion.com

Expo with Android Studio Emulator error: "Error running adb: This computer is not authorized to debug the device"

I am trying to connect an Android Studio Emulator to my expo application, but I get this error message:
Couldn't start project on Android: Error running adb: This computer is
not authorized to debug the device. Please follow the instructions
here to enable USB debugging:
https://developer.android.com/studio/run/device.html#developer-device-options.
If you are using Genymotion go to Settings -> ADB, select "Use custom
Android SDK tools", and point it at your Android SDK directory.
Does anyone know what to do with this?
Thanks!
What has worked for me just now:
Go to tools.
Select avd in Android studio.
Select your emulator.
Wipe data.
Click "Start again".
tldr:
Look at the emulator "screen" and accept the prompt asking if you want to allow debugging.
I got that message you described in the question when I did the following:
In Android Studio Virtual Device Manager (VDM), start the emulated device
run npm start (which runs expo start)
expo Metro Bundler runs (command line and browser)
in expo: select Android emulator
in expo: see the same error that you posted
The provided link didn't seem to pertain to the emulator.
I didn't realize at first, but the solution was waiting on the screen of the emulated device. It was quietly showing a standard Android permission prompt, asking for permission to allow debugging the device. This prompt is described in the "note" in https://developer.android.com/studio/command-line/adb#Enabling,
Note: When you connect a device running Android 4.2.2 or higher, the system shows a dialog asking whether to accept an RSA key that allows debugging through this computer. This security mechanism protects user devices because it ensures that USB debugging and other adb commands cannot be executed unless you're able to unlock the device and acknowledge the dialog.
This of course I would expect for a phone, but didn't think of it for an emulator.
Once I granted that permission in the emulated phone, then expo proceeded to run on the emulator.
I discovered that "USB Debugging" had been turned off in the Developer Options of the emulator. Turning it on fixed the problem. No idea how it came to be turned off.
I had this problem today, I just disabled USB debugging and enabled it again. Worked.
Go to android studio
Open AVD manager
Wipe data on your emulator (Clicking dropdown icon in actions column )
Launch emulator
enjoy :)
First close your opened android emulator.
Open android studio and go to AVD manager.
Select virtual device which you have faced trouble, under actions select wipe
data option.
Give ok for the opened window.
These steps worked for me.
I was using the emulator from Android Studio for my expo projects. It used to work properly.
Then, one day the emulator stopped interacting with expo, always saying:
This computer is not authorized for developing on .
https://expo.fyi/authorize-android-device
The advices given on that link did not help. Revoking the USB permissions did not help either. Even newly created Devices in AVD Manager did not let me connect.
However, finally this answer solved the problem for me
Choosing a device from AVD Manager without Google Play Store on it let me connect expo to the emulator, again.
Note: I could not get to the root cause of the problem, so I am still not sure why it stopped working all of a sudden. I upgraded to Expo SDK 39 at the same time that I switched from managed workflow to bare workflow. So, one of those circumstances may have caused the problem.
I know the exact answer of this question
The Problem is your AVD manager is not set to the path
Than you have add to path first is ANDROID_SDK_ROOT and PLATFORM-TOOLS
HERE I GIVE ALL THE LOCATION PLATFORM TOOLS - C:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk\platform-tools
ANDROID_DK_ROOT - C:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk
ADD in path (SEARCH ON START EVIRONMENT VARIABLES) and than restart your pc
Try running a lower version of the android emulator from android studio. I was getting the same error while trying to run the latest expo-react-native app on android emulator version 9.0 Pie. I got it working by running a lower version of the android emulator version 8.1 Oreo. You also have to tab allow/ok on the phone screen when asked for enable USB Debugging
during the app booting on the emulator.
I had the same issue and it almost took one day to figure that out.
First try enabling the USB debugging mode, still if it shows the same error try the next step. Try to check ADB devices in cmd, if it doesn't work go and change the environmental variables of the android SDK manager.
And refer this link
https://medium.com/#vsburnett/running-a-react-native-app-on-an-android-virtual-device-with-expo-in-windows-10-9e0976db5f50
For Windows:
Select 'Wipe Data' option in the AVD manager and restart again.
Or
Add SDK tools path eg: E:\Android\SDK and SDK platform-tools path eg: E:\Android\SDK\platform-tools in the windows system environmental variables. (In my case I have installed SDK inside the E directory)
Open the Android Virtual Device Manager(AVD Manager).
And in your current virtual device on the right side, there will be a dropdown icon, and click that icon.
In the dropdown list there will be a Wipe Data and click it.
And Run your Emulator
I was facing the same issue. I am using windows machine. Steps I did to resolve:
I have added the environment variable.
To Add System Variable, search environment variable in Windows (or search google how to open environment variables, if you are on some other system or cmd). In the system variable add the Variable: ANDROID_SDK_ROOT to your android studio path, like in my case it is: C:\Users\kushalseth\AppData\Local\Android\Sdk
At the same place, i.e. System Variable, Click on Path and add this, it already doesn't exists. Please check this path in your system: C:\Users\kushalseth\AppData\Local\Android\Sdk\platform-tools
To Validate, run the command: adb in command prompt.
(Also check, if you are logged-in to expo from cmd. This is an extra precautionary step.)
today I experience the same issue but I have fixed it very easily. Try the solution it might work for you too.
Many developers have wsl or windows subsystem for Linux and it is using a VM and I found it blocks the android sim and causes the error "Error running adb". The solution I found was to open my PowerShell and type "wsl --shutdown". After rerunning the script for android emulation from expo it worked like a charm. Hope I helped.
There are two ways of doing this.
Wipe SDK data
Kill a running emulator
First step:
Open android studio > virtual device > click on more_vert > select wipe data
Second step:
Open your command prompt and use this command
adb -e emu kill
or
If Expo CLI is running, stop it with ctrl+c -- this will stop ADB.
Disconnect your Android device from the computer.
Revoke USB Debugging on the device:
Open the Settings app on your device.
Navigate: Developer Options -> select Revoke USB debugging authorizations.
Reconnect the device:
The device will prompt you to agree to connect the computer. You must confirm it.
The computer is now authorized for debugging!
This computer is not authorized for developing on. https://expo.fyi/authorize-android-device
I resolved this issue by choosing a device without the google play store
(play button).
Enable Virtualization on your machine
Enter your BIOS settings on boot of your machin and enable Virtualization Technology. The location may differ depending on your processor.

waiting for device to come online

A couple of days ago (15th April 2017) I updated Android Studio with all the latest updates. Now when I try to run an app, the emulator window opens but I just get a message "waiting for device to come online". Eventually this times out and I get a message "installing APK", where it just seems to get stuck. I have searched the site and tried various advice including:
Deleting all the emulators and re-creating
Turning off the emulator in SDK manager, re-starting Android Studio and turning the emulator on again
turning off instant run
re-booting my PC, in case some update needed a re-start
The emulator I have is Nexus5X API23.5554
I have also deleted my app and created a completely new "hello World" app that does nothing but display one line of text, but I still get the same problem.
Has anyone any other ideas?
I ran into this issue too. It seems to be a bug with recent changes to the Android emulator. There is a workaround:
Launch the emulator independently from the Android Virtual Device (AVD) manager (there's an icon in the main Android Studio window)
Run your app. You'll notice the device name has changed from whatever the emulator is called to some generic name like 'Android x86 API 25'.
The app will run correctly on the emulator. You'll notice in logcat that the device name is 'emulator unknown'.
Hopefully Google will fix this over the next few days.
I couldn't get any emulator going at all, with no error messages, just 'waiting for device to come online'.
When tried to stop and start adb.exe in terminal:
adb kill-server
adb start-server
it said that adb is outdated. I had latest adb version downloded but Android Studio was trying to use some other file which was older version.
Finally, I checked environment variables and removed paths to:
C:\NVPACK\android-sdk-windows\platform-tools
and
C:\NVPACK\android-sdk-windows
as the newest version of SDK platform-tools I had on drive E: not C:, and is all working now.
Enzokie - Thanks. Nothing there seems to work, though. As a novice, I always assume that if something is wrong, it's my fault, but maybe not this time! I shall do as you suggest and raise it with Android unless anyone else suggests something that works.
My work around was to use a Nexus 5 instead of Nexus 5X.
If you don't know how to make an new emulator its tools>android>AVD manager> create new virtual device. Then just pick a new emulator and hit next until you're finished or customize it.
Resetting the ADB did the trick for me.
For Mac, In Android Studio -> Tools -> Android -> Android Device Monitor -> Under devices -> Down arrow there will be reset ADB option.
What worked for me was to wipe the emulator data. You can do this from AVD manager:
Tools -> AVD Manager -> Right click on virtual device - > Wipe Data
Hi I had the same Problem...so I did this:
Start your emulator, you will get the "wating for device to come online" error msg.
Wait till the emulator boots, then stop the process.
Now, on the emulator go to settings and make your "device" (emulator) to a developer device.
Check this, if you dont know how to do it -> https://www.digitaltrends.com/mobile/how-to-get-developer-options-on-android/
Then go on "Developer options" (in settings) and switch on the "usb-debugging" option. Remeber you PCs fingerprint.
Hope this was helpfull....

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.

How do I properly setup Android Studio to work with GenyMotion?

I am using Android Studio 1.1 and GenyMotion 2.3.1
I have followed many guides online but I am unable to run my apks through Genymotion.
This is what I get when I try to run something:-
When I click "Run" I get a "Configuration is Still Incorrect. Do you want to edit it again.?" with two options :- "Edit" and "Continue Anyway".
How do I solve this problem?
Have you added the Genymotion plugin. Go through this. Genymotion Plugin for Android Studio
Seems like Android Studio is not picking up your module (so not a Genymotion problem). Ensure that one of the first lines in your module (not root project) build.gradle is this:
apply plugin: 'com.android.application'
On second thought the problem might be your folder structure. You opened the root project in ...../bartalk-master but it is in reality located in ...../bartalk-master/bartalk-master. Fix this and you should be good to go.
Genymotion devices behave with ADB exactly like any USB device you plug into your computer.
Considering your problem the window appears because Android Studio does not find a device to connect with : no USB device, no AVD (official emulator), and no Genymotion instance.
The Target Device section, on the window, allows you to choose on what kind if device you want to launch your app. If you want to use Genymotion you can let it set Show chooser dialog or whether USB Devices.
Now, what you should do is to be careful to have a Genymotion instance already launched before running your app.
To be sure the connection is already done you can try to type adb devices you should see something like this:
List of devices attached
192.168.56.101:5555 device
The <ip>:<port> device line is the Genymotion instance currently running.
Please give more details about your situation if this does not solve your problem.

Categories

Resources