Change default Android emulator when debugging Xamarin.Forms app? - android

I installed VS2017 a few days ago, created the simple app Build your first Xamarin Forms App, and now I want to debug.
I am having issues with the default Android emulator created by the VS2017 installation (Android_Accelerated_x86_Oreo) so I created a new emulator. This is the screenshot.
How can I change the default so it debugs in the newly-created emulator?
I wanted to point out that I'm new to all of this, so I would like to run it without having to install anything else. I would like to see something run before I install anything else.
I also wanted to point out that I've tried clicking on "Start" on either one of them when not in debug mode, and I get Could not start emulator. Unable to load DLL 'DismApi' error.
The only way it automatically starts is if I hit F5 and the emulator window pops up. Then I go to Tools > Android Device Manager and the default emulator says "Stop" (it's running). If I click on "Stop" and then press "Start", I will get the same error again: Could not start emulator. Unable to load DLL 'DismApi'.

Where you launch the debugger just click the arrow pointing down to open the dropdown. Then select you new device. It will stay as you default device. Please see the image for reference:
Note: You may have to restart Visual Studio for your new device to appear.

Related

Running app from android studio does not save onto my android device anymore

I have only just started android programming, but I have a few basics programs working. Normally when I click run in Android Studio and choose my galaxy nexus as a running device, the app I'm running opens and is saved onto my device, so that I can open my program when I am not plugged into my computer.
However, now when I hit run, my program opens, but it is not saved onto my device.
This happened almost immediately after I changed my application label in my manifest file, but I'm not sure if that's related. Any help is appreciated!
Make sure that "deploy the APK" is selected in Run-> Edit Configurations
You have to set it at the new project screen. Its greyed out but theres a link next to it. Just click it. Its next to the Package name and that is the only .app extension you need to execute the apk.
I had the same issue. For me the problem was that the icon was not appearing on the screen but I found the app was actually stored on the device. I have installed NovaLauncher on a Meizu U20. I went to see the "Applications List" (tr. it. "Menu delle app"), I found my app icon there and I drag/dropped it on the screen.

AVD Manager window blocks Eclipse window on Mac

I'm a complete newbie trying to learn how to write an app. I'm trying to run Hello World using the emulator in Eclipse on my Mac. I launch and unlock the emulator. Android Training then implies that I should click the Run icon in Eclipse. But the ADT Manager window is in front of the Eclipse window and Eclipse is disabled. If I minimize the ADT Manager window it just quits the ADT Manager, and then I must close the emulator window.
I did discover that I can run the app with the Run button without starting the emulator as a separate step, although that takes a long time to get going.
Another Answer implies that I can just rerun the app by clicking the run button again, but I can't do this because the Eclipse window is disabled.
I'm used to being able to use the IDE while a program (Yes, I'm an old programmer) is running. What am I missing?
Duncan
You're right - simply hitting run on the application cold turkey takes forever because the emulator has to initialize. When you click on your AVD Manager (where you can create, edit, and customize the android emulator you'd like to use), Select the emulator you'd like, then click Start.
After waiting for the emulator window to popup, just wait until the UI loads (when you can unlock the emulator).
At this point, it appears that the AVD Manager is still necessary (due to the "loading" type green bar along the bottom seemingly feeding the emulator), but you can just close the window, and the Eclipse window will become clickable again.
Now, you can just leave the emulator running. I typically leave it running for hours at a time (even overnight) and I can usually just click Run as Android Application and everything works perfectly.

Writing first Android app, stuck trying to simply run the Hello World tutorial

I'm new to Java, haven't used Eclipse in probably 2 years. We're starting up a mobile dev team at work, and I'm just going over the tutorials on the Android site:
http://developer.android.com/training/basics/firstapp/running-app.html
Simply just created a project, launched the virtual device manager, have that emulator running, then click Run -> Run as Android application in Eclipse .
I've been staring at this screen for about 5 minutes now:
It says "Launching (100%)" in the bottom right corner of eclipse, and this Progres window just says Launching, but the emulator isn't doing anything.
I know emulators are generally pretty slow... But is this normal or did I do something wrong?
That happened to me too, and still does at times:
Close the emulator and execute the program again
If that didn't work, execute the program while the emulator is running. A new emulator will pop up, close the old emulator
If that didn't work, delete device and create a new one.
Also, is there anything at all popping up on the Logcat view?
I would recommand checking the list of process afterwards. Sometimes when i brutally terminate an app in eclipse, the process is still running.
But i'm on PC and i use an older version. Maybe it has been fixed.

Genymotion: how to load apk every time?

I'm getting started with Android development and with Genymotion. It's difficult to get Genymotion to install a .apk and run it more than once. Here's what I'm doing:
Begin with Genymotion running.
Press Genymotion icon in Elipse.
See Genymotion Virtual Devices Manager. Note that State of my VM is on
Create a new Android Project
Press the green Run button
See Run As dialog. Select Android Application
See Android Device Chooser. Select Genymotion_nexus_one
See hello world app run. Press GM home button
From here if I change the app, it's difficult to get the app to re-display in the emulator:
Drag a button to activity_main.xml. Save.
Press the green Run button
Nothing happens
To get the app to re-display requires jiggle the Handle type actions:
If I Clear the console log or bring up the GM Virtual Devices manager, before I press the Run button, the app will generally display in Genymotion.
Any ideas how to make Genymotion behave without Jiggling the handle?
I'm running the latest SDK: 20131030 on OSX 10.7.5
Drag drop apk on Genemotion emulator ,it will automatically installs and creates a shortcut.enjoy.
run in command-prompt :
adb install your_app_name.apk
:-)
Solved:
Since installing the adt-bundle-mac-x86_64-20131030, I'd never right-clicked the Run button to display the drop-down menu there. Having done that once, pressing the Run button now brings up Android Device Chooser every time (as it should).
When I first ran into this problem, I reinstalled adt-bundle-mac-x86_64-20131030 and Genymotion. I saw no change in behavior. This appears to be a minor bug in this version of adt-bundle-mac-x86_64-20131030
In Android Studio, if you run your project (shift+F10) when Genymotion virtual device is running; you'll see the device in connected devices list in Select Deployment Target window.

android eclipse avd

I'm a newbie that needs some help on getting the AVD running with my app. I've been developing C code for decades, but I have to admit the Eclipse/AVD setup has me stumped! I'm following the 'HelloWorld' tutorials on the developer.android website (and some others) and everything seems to be working OK, up to the point where I try to run it on the AVD simulator. I'm not getting any warnings, the Eclipse build/run output window says that everything is installed OK and the AVD does startup and run. Eclipse says that my app is loading, but it never runs. All I get is the simulator window with "ANDROID" on the screen and the buttons on the right-hand side.
I've got Eclipse Indigo and r18 of the Android PlugIn (I tried to install Helios, but the Eclipse website directed me to Indigo!). Is Indigo OK for running the simulator, or do I specifically need Helios? I also have Java 1.7.
The API level I have installed is Level 15 (v4.xxx of Android, I think). Don't know if I need a lower version to get my tutorial app to run, but level 15 is the only one I can select when setting up a device in the AVD manager.
I've been trying to get this going for days, trying all sorts of switches and buttons, but to no avail. Before I start uninstalling everything and reinstalling, can anyone advise if there is anything I might be missing, or has tripped over this problem themselves and found a way around it? Something that always trips up new starters maybe? Or do I need to go back to scratch?
Any help would be much appreciated.
How long are you leaving your emulator running after you attempt to launch your application? The Android OS can take a long time to boot up in the emulator. If it's stuck on the "ANDROID" screen then you're either not waiting long enough or there's something wrong with your emulator. It should eventually boot into the normal Android lock screen or home screen just like a device.
You can launch your emulator ahead of attempting to run your app by opening the Android Virtual Device Manager (toolbar icon in Eclipse, if installed properly) and then selecting an emulator and clicking the "Start" button. If you don't have any emulators listed, then you need to create one by clicking the "New..." button.

Categories

Resources