I'm trying to run the very simplest app on MonoDroid though the MonoDevelop IDE - i.e. the one that is created as part of the new project (the one that increments the lable on button clicks - i won't post code as I don't think it is relevant unless someone really wants it).
When I press the run menu item then run (or debug) i get the emulator selection
I dutifully start the emulator - (I've tried API_7, API_10, API_12) and that works OK. But the IDE above never refreshes to show the currently running emulator so I can't launch the application. I have manually refreshed but the same list comes up. What I am expecting is the new emulator to appear in the list and the OK button becoming active.
I have tried running adb devices in the command line and I can see that the debug bridge has picked up the device i.e. it says emulator-5554 which matches the TCP/IP port that the emulator is running on.
I've also tried restarting the debug server i.e.
adb kill-server
adb restart-server
But I can't see the emulator appear on the above dialog. The debug server is running on port 5037. Could the IDE be listening to a different port?
Fundamentally I'm trying to get the simplest app running through MonoDevelop. And I'm failing. Please help good people.
I had the same problem initially when I tried running the emulators. My recommendations from my own experience would be to:
Run the Android SDK manager and retrieve all the latest SDK packages.
Create your own Android Virtual Device via the AVD Manager rather than running those that are listed when the IDE is intially run. You should then start the AVD manually via the AVD manager and ensure it is fully loaded before starting the de-bug.
Related
I am trying to do NativeScript development on an Azure virtual box. The installation of the NativeScript development environment has been completed successfully, as I do not have any issues when I am running the
>tns doctor
command:
Once I try to run my application:
>tns run android --bundle
I see that it is successfully installed on the device identified as 'emulator-5554' but then this error pops up:
Unable to apply changes on device: emulator-5554. Error is: connect ECONNREFUSED 127.0.0.1:50232.
Here is a screenshot of my VS Code Terminal window:
It does not matter whether I start the emulator via VS Code or in Android Studio, via the AVD Manager. The same error occurs. It's just the port on the localhost (127.0.0.1) that is different.
I can see the emulator running, but it stays with a blank screen, without showing my application:
Now, since that is an Azure box, IT has all kinds of restrictions on it. All the ports are locked down, but I can get them to open one for my needs. The problem is that I do not know which one to ask to be opened. As I said, every time the emulator is restarted or accessed, the port in the error (ECONNREFUSED 127.0.0.1:50232) is different.
Anyone else has faced this issue and is there an easy solution? I was hoping that maybe there is a way to launch the emulator and have it listen to the same port always. Can that be achieved?
TIA,
Eddie
Edit [Feb. 12, 2020]
One of my IT friends has created a new inbound port rule on that server:
and now I do not get that error anymore. Instead, I get a different error. Maybe it's not an error per se, but the application does not start on the emulator which appears to run on its own:
Does anyone have a suggestion for this one?
First post, and new developer.
I installed on my Mac (10.6.8) the complete package from Google and proceeded to open the SDK Manager and downloading everything. I then installed the IntelHAXM_1.0.8.dmg and rebooted. I created a couple of virtual devices (VD) in the AVDM and attempted to start them. They are not set to use GPU acceleration and have the skin to the first option (Skin with dynamic hardware controls).
When I click 'Start', the progress bar in that windows shows me its starting. Upon reaching the end, the window with the progress simply disappear, and I'm back at the list of my Virtual Devices. I thought, maybe its an update I did. So I deleted and started from scratch with no SDK updates. Same results. Tried Different devices, with or without GPU.
The virtual android never shows up.
I also installed the Android Studio and the same thing happened. On the virtual Windows 7 I have setup on that Mac, the virtual devices load up fast. But on the mac itself, they never appear?
Why?
I think it does not matter to be on mac or windows, it is related with android emulator configurations.
emulator takes a while, from 30 sec till few Minutes, so be patient.
if it did not work, try to use configurations like one of these to start up.
or
When I try to debug using one of the configurations that I've set up (for example Android233), the emulator never actually launches. I just see a little green icon in my task bar that says "launching Android233," but it never launches. I've let it sit there for hours and it never does anything. I don't know if this is related, but my emulators don't show in device view in the DDMS perspective. I have a physical Android device, which shows up in device view. My question is, what is happenin' and how can I fix it?
Thanks for taking the time to read my question :)
I thought I had the problem figured out, but it stopped working again. Here's more information: When I run my debug configuration, in the lower right corner of my Ecplipse windows it says:
"Launching MyDebugConfig (100%)" and then there's a green icon next to it.
I looked in task manager and the emulator is not in there. I looked in DDMS and my AVD is not listed and there is nothing in the LogCat or Thread or anything else for that matter. I have my debug configuration set to prompt me to pick a device, but it never does that. It just loads my AVD, even if I have my phone connected (which is visible in DDMS). I'm so stumped. I've had this problem since I started using Eclipse and I don't know what to do.
Thanks.
Go to DDMS Perspective =>Click View menu=>reset adb
If Your genymotion virtual device is not seen in android device monitor then just try this.
1. start android studio
2. start Android Device Monitor
3. Lastly start the genymotion virtual device it will appear
The emulator won't show up in the DDMS section until its running.
The emulator won't lunch probably because you misconfigured it, currently the lunch dialog of the emulator doesn't support error messages, however you can get the lunch stack trace while you try to lunch the emulator via Eclipse.
Disconnect your physical device, run your project and select the emulator. you should see an error message on DDMS console.
If you in Windows try run (after starting emulator)
adb.exe kill-server
adb.exe start-server
and wait for restarting your adb
I have written some codelines with libgdx in eclipse and want to run them on my android device.(It's a tablet)
But i cant find out how to do this.
I even cant run it on the android emulator provided by the android sdk. I get an error that the app stopped unexpectedly.
The app is working fine with the desktop launcher...
I hope someone can explain me how to get it working on the emulator or on my android device.
I saw somewhere that simply connecting my device via usb should be enough that eclipse is able to create an temporary app on the device, but this also didnt work.
Regards
1st of all, download SamsungKies[latest], to get and install proper USB Drivers. Its important that it should be the latest, cuz there was a bug in the previous versions.
Now that you have the drivers, simply connect your device to your machine IN USB DEBUGGING MODE.
Go to your main activity, and run.
If it launches in an emulator, close the emulator, and again in main activity, select run configurations -> Android Applications -> target -> always prompt to pick device.
Run again, and it should install and run in your phone/tablet.
NOTE:The activity closes in emulator because, by default, the emulator doesn't support OpenGLES emulation, its too heavy for your CPU.
i know its kinda late, but i hope it helps others:)
When trying to run an android emulator (either from eclipse or the cmd line) it simply starts an empty black box with the title 0: (obviously replacing with the name of the avd!). It never boots - doesn't even get to the boot animation.
Logcat shows absolutely no output and devices shows it as emulator:5554 - offline
This happens regardlessof which avd I start - and they had all previously worked.
I'm running all this on linux.
Edit: interestingly it also now fails to recognise an actual phone plugged in with debugging enabled... Android dev is now effectively impossible on this machine until I fix this...
Edit #2: If I create a new emulator and/or edit an existing one (even if I don't actually change anything) enables it to boot. This obviously enables me to move forward, but there is clearly still a problem with adb (actual devices still won't connect) which I still need to fix.
Edit #3: Scratch that last edit - it seemed to work briefly, but not anymore...
The emulator is a horribly slow piece of junk. Startup times of ten minutes or more are not unheard of. You are better off connecting an actual Android device via USB. If you insist on using the emulator, keep it running between debugging sessions to preserve its state (and your sanity).
Do adb reset in eclipse ddms devices view
and go to adb try this
adb shell stop
adb shell start
Ran into this problem in Eclipse--was getting errors in my XML files--as a result my R variable was unable to resolve. When the new Android Application project is created, another appcompat_v7 project is also created. These two projects are associated. The problem cropped up when I kept my main project open, but closed my appcompat_v7 project. When both were open at the same time, the problem disappeared.
Simple, but there it is.