Android Emulator doesn't work as expected - android

I'm new to Android Development and am currently trying to develop my first application
I started with the tuturial available here: Tutorial
I just setup the complete environment for android development:
OS: Windows 7 x64, CPU: 3 GHZ AMD Phenom II X4, RAM: 8GB.
IDE: Eclipse IDE for Java Developers (Version: Indigo Service Release 1)
I downloaded the SDK from here http://developer.android.com/sdk/index.html
Then i followed the instructions from the tutorial.
However my problem is: When I run the application as an Android Application the emulator gets started, but then get stuck at the following screen:
Even after waiting for more than 30 minutes or even 1 hour it displays still the same screen.
There was only one "problem" while installing the Java JDK:
- For the JRE was already a newer version installed. (Installed: "Java(TM) 7 Update 2 (64-bit)" I however downloaded the latest sdk from the oracle site. I don't know if the runtime und the sdk must have the same version...
In addition I was yesterday once I able to start the emulator and as long as I let it run it worked quite well... I could even debug the application... However, if I now tried to start the device from eclipse it crashed instantly. Same thing if I start it from de AVD Manager directly ("From Snapshot" or with "Wipe User Data" doesn't matter...). So I deleted the device and created a new one with the same options. Now however I am again stuck at the screen above.
I have no idea of how the whole emulator works. In addition there is A LOT of information in the internet available about crashes and so on (lots of them for earlier releases of the AVD, however I havn't found anything that helped my out.
It would be quite useful to know how the emulator usually works. And maybe getting a hint, what I could do to.
Thanks in advance...

I had a similar issue when updating from the JDK 6 to 7, and solved it by going back to the JDK 6. I still cannot use the JDK 7 for a mysterious reason.

Related

Xamarin.Android project hangs indefinitely when trying to deploy to an Intel HAXM Accelerated Emulator

I've recently downloaded Visual Studio 2017 Community Edition With Xamarin (almost 21Gig), followed by latest Android SDK (another 50 gigs or so) and related tools, along with Intel HAXM tool.
All the above installations are fully succeeded and supported on my Win8, Core i5, 8GB Ram desktop development box.
The issue is The AVD launches and the build process goes on and on for like ages (I just wanted to check how soon the simple 'Hello World' app is deployed and I've waited for 2 hours).
I got no error warnings no sign-of freezing anything within VS or on OS, yet nothing seems to working. The simulator shows up however the sample application is not being deployed
Only thing I suspect for now is change of SDK location which I believe, I took care of that already.
Please advise, what could be the reason (check the screen shots for more info)
Though the reg-edit change is made according to this forum
https://forums.xamarin.com/discussion/64088/android-emulator-opens-but-project-does-not-deploy-and-start
My SDK Manager is also fully updated
The AVD in question
The following trick worked for me,
I was not noticing the release mode can have issue (even debug mode is poorly working though)
Thanks Plac3Hold3r for pointing me towards properties, I wouldn't have
noticed the other factors, other wise. Wish I could have marked you
for an partial answer. Anyway thanks for your time, really appreciate
it.

Xamarin.Forms Visual Studio 2017 project does not deploy

I am new to Xamarin. I used Xamarin. Forms template to create a sample mobile solution in Visual Studio 2017. The process created four projects Xamarin PCL, Xamarin Android, Xamarin.iOS and Xamarin.UWP. Without making any modification to the generated solution, I am trying to run it.
The first issue is, when I set the UWP as the starting project, the Windows emulator shows up and runs the app perfectly. But when I try to do the same with Android, I get different errors at different times based on the environment changes I make. Finally, using the visual studio android emulator, the Phone UI shows up but not my app. In the background, I can see that Visual Studio completed the build process successfully without any errors but the deploy process simply hangs. I left the deploy running overnight but still running in the morning. Here is my environment.
Intel Core i7 processor
Virtualization enabled in BIOS
Windows 10 Education
32GB RAM
Hyper-V disabled in Windows
Executed bcdedit /set hypervisorlaunchtype off in the command window and rebooted.
I tried setting the above environment in different combinations but none of them seem to make the app work. When I use an android emulator from android SDK, the build process throws errors. The only emulator that even builds is the visual studio emulator. But the deploy hangs.
A second issue I have is, I have installed android SDK for version 24 and 25. But in the emulator dropdown, I can only see the emulators for 23. I checked the installation path both in visual studio and android SDK manager and they both point to the same installation folder. What do I need to make the emulators for version 24 and 25 usable?
I repeat, I did not make any change to the generated solution in visual studio before running it. I have been at it for the past three days and couldn't make it work. Please help.
I just installed Visual Studio 2017 (on Win10 15063.138) and found, like you, Xamarin projects won't deploy to Android. Here's how I got running:
Updated everything in the Android SDK Manager.
Installed the new, improved Android Emulator from MS:
https://www.visualstudio.com/vs/msft-android-emulator/
Used that to download/install an API level 23 (6.0 Marshmallow)
emulator
Started that emulator using the same tool (you'll see it running in Hyper-V Manager)
Selected same emulator in VS for deploy/debug (the emulators that ship with VS are painfully slow)
In VS, selected Android project for start-up and verified build and deploy to Android in build config mgr.
Note: MS doesn't appear to have any emulators above API level 23, so Compilation and Target settings for your Android project can be the latest, but the minimum target will have to be 6.0 (API 23).
After pulling my hair for the past few days, I finally got my Xamarin.Forms Android App to show my page on the emulator. Thanks to all the members for their suggestions. Ryan's suggestion helped a lot ( I +1ed him, thanks Ryan) but did not solve my problem. I googled further and found a suggestion that asked to change the following setting which did it for me finally. So, if anyone else get stuck like I did, please do the following (in addition to cleaning up and updating all packages):
Open up the setting for your Hyper-V vm for your emulator (while the VM is off).
Expand the Processor node on the left and click on "Compatibility".
Now put a check mark on "Migrate to a physical computer with a different processor version" on the right.
Start your emulator in the Visual Studio Emulator tool.
Now, start debug your android project in VS using the same emulator that is already running.
After a delay (there is always a delay), your app will show up on the emulator. Yey!!

Android AVD Emulator Runaway CPU. Fix? Anyone else having the same issue?

Android Studio 1.2.1.1 on an Ubuntu 14.04 LTS 64 bit both fully update.
When run one Emulator the CPU runs real hard, about 4x times as before an upgrade a couple of weeks ago. Seems like each Emulator is using more RAM than before as well. Can only run at most 3 Emulator before the computer becomes overloaded and unresponsive, before could run at least 8.
I checked to make sure all the required Linux libraries are on the machine.
Filed a bug on Android Studio as:
Issue 173578: Race condition when running AVD Emulator since updating Android SDK Tools, revision 24.2
Just started UI tuning (Again) and this problem is killing me time wise since I can not open many emulators to check the UI.
Anyone else having the same or similar problem? If so star the bug report.
Anyone know of a fix?

Android SDK 2 emulator works but 3 doesn't

I have read this thread Android emulator refuses to boot
and tried to apply the solutions, none did work for emulator 3. I even tried to add my d:\androidsk folder to path and android_sdk_home environment variables, it doesn't solve the problem: it just shows _android on the black screen for hours.
I have installed reinstalled multiple times also already.
What else could I do ?
I got the last version tools from today google sdk site.
Update: I have started several times, I got it work once but with error message "Activity launcher forced to close", I have to click wait multiple times to see android desktop.
When I close the VM and tries again with the same I cannot make it work again.
This I tried on 2 machines:
Netbook eeePC 1215B (AMD c60 if I remember well) and Windows Tablet EP21 (intel core i5)
Why on earth do some people downvote this question ? I'm not the only one who got that problem, are they ashame that Android sdk is so buggy ?

Android emulator never loads in Ubuntu 11

I've posted a similar question with a similar problem but on windows XP. So i installed ubuntu 11 and this>
sun-jdk 6, sun-jre 6, eclipse galileo, adt plugin and the android sdk.
Not even the 1.5 android target device works. Just loads forever, reaching the flashing android word screen and it goes on and on. I let it load for a hour and nothing changes.
What's the checklist to make this run? I am very dissapointed with this situation.
Specs> Athlon 64x2 3600+, ram = 1.5 Gb
I made the default 1.5 target device, another one with 2.3.3 and 256 ram, and another one with 2.1 and defaults.
What error do you get in console when you launch eclipse by hand and launch adt ?
What is the jre/jdk used to launch eclipse ? (ps fax | grep eclipse)
Stéphane
Once the animation comes up you should be able to get an adb connection to the emulator and use the adb shell or adb logcat output, this will let you know if it's still doing setup tasks such as dexopting packages, if it's dead, or if the android runtime is stuck in a crash and restart loop.
Just reinstalled the jvm and it worked.

Categories

Resources