This question already has answers here:
Making the Android emulator run faster
(19 answers)
Closed 7 years ago.
Recently I started to learn Android programming. I instaled Eclipse and Android SDK. All goes well, but every time when I run a project which has a error, the emulator and Eclipse begins to run very hard and I often have to close Eclips and the emulator.How can I solve this problem?
I answered this before, but it might help you too.
I prefere using the the Bluestacks Player. It runs Android 2.3.4 and is very fluent and fast. Sometimes even faster than a normal device. The only downsize is, that you can just test Apps on the API Level 10 and just on one screen size, but it's perfect just for testing if it's working or not. Just connect the Player with the adb by running
adb connect 127.0.0.1
After compiling it installs instantly. Very impressive, considering I have a rather average computer hardware(dual core with 4 GB of RAM)
Here are my suggestions:
Do a quick google search for "how to make the Android emulator run faster" (or something along those lines), because you are definitely not the first person to ask this question.
Buy a cheap, physical device to test with. It'll make your life a lot easier.
You don't have to close the emulator in order to iterate your development cycle. That should speed things up a lot for you. You can also enable emulator snapshots, so the emulator will start up quickly the next time. (It does slow down closing the emulator, however).
The other thing is, though, if your machine is underpowered or does not have sufficient RAM, it could be thrashing. Eclipse and the Android emulator do require a fair amount of memory. Ideally, you should have at least 500MB of free memory before starting Eclipse (1GB would be better).
In my experience, when you always install and re-install apps on the emulator to test, it gets clogged up and starts lagging.
Solution: Delete the AVD you have created from the Virtual Device Manager.
I hope this will help you.
Goto to your BIOS settings. Enable your Virtualization technology in your settings..
It solved my problem...
Related
I am very enthusiastic in learning and developing android applications using the native java language. Sadly my emulator is not running at all. It ran once but it was very very very slow. I am using Eclipse and the Android ADT bundle.
If it is a hardware thing here then please see my specs below. As far as I'm concerned, these are pretty decent specs for a laptop for developing apps.
Can anyone shed some light on why the emulator is unable to run properly? I really would like to start developing apps as soon as I can.
You can try three things:
Check whether your processor supports Intel HAXM. This will make the
emulator as fast as real device.
Try GenyMotion.
Alternatively, consider developing on Linux. The Linux kernel contains a module called kvm that is the equivalent of the Intel HAXM driver on Windows. The emulator is blazing fast on Linux with any kind of processor.
References:
1. Why is the Android emulator so slow?.
2. Speed up your Android Emulator!.
3. 8 Tips to Speed Up Your Android ARM Emulator.
4. How to speed up the Android Emulator by up to 400%.
The stock emulator is very slow. I had the same issue currently I am using Genymotion emulator which is way to better than the emulator that is packaged with the SDK.
here the download link:
https://www.genymotion.com/#!/download
Though it does not have all the features available for free
I am new to java and android and wanted to see how developing for android works
I started by downloading the SDK FROM HERE
However after I finish making the Hello World project sample given in the website HERE, if I try to run it on the emulator as explained HERE, the emulator screen appears, but nothing seems to happen. I can see the word android on the middle of the screen with some animation happening, but that's it. The website says something about unlocking the emulator, but I have no idea what that means. What I have gathered from reading other posts is that the emulator is supposed to have some kind of slider switch as in real smart phones which should be dragged to unlock it, but I can't see it in my case. Now I have no idea why this is happening or what I should check out in order to fix this. Are there any installation logs or something else that I can check to see what the settings are?
What I have tried till now:
I downloaded the SDK ADT bundle from HERE and just unzipped it. Then looked for eclipse.exe and ran it directly. Is there anything else I should have done prior to this?
When I did it for the first time, I had only JRE installed and not JDK, which I realized after reading THIS POST. So I downloaded JDK from HERE, updated the required environment variables and restarted eclipse, but still it's the same thing.
I looked at the Eclipse isn't talking to the emulator section GIVEN HERE, but all it says is to restart eclipse and the emulator, and it doesn't do anything at all.
Rant:
I can understand if the program had failed to compile when I didn't have JDK , or if the IDE gave any indication at all of a faulty program install, but that isn't the case. Everything seems ok, there are no errors, but it just doesn't do anything. This is the type of thing that makes people pull their hair out, and personally, I think the With a single download, the ADT Bundle includes everything you need to begin developing apps: in the android website is very misleading, especially for complete beginners
Anyway, what should I do to make the tutorial program run on my computer? My computer is a bit old and slow so could that be an issue? My computer is Windows XP SP3 on Intel(R) Pentium(4) 4 CPU 3.20 GHz 3.19GHz 2.50GB RAM, but if that was the case I assume the emulator shouldn't even start up
You just have to wait a bit longer. Android loads pretty long on emulator.
Tutorial says about unlocking, because when Android is loaded, your screen on emulator will be locked.
If you find emulator too slow for you, you may want to check this topic out: Why is the Android emulator so slow? How can we speed up the Android emulator?
I had the exact same problem as you when I first got into Android development a week ago. The two things I did are simply
1) Set the usable RAM on your AVD to 768MB
2) When you run your Hello World program in your emulator, give it about 5-10 minutes. Don't touch or click the window at all, just let it load up. Later you can make it persist
3) If your home screen comes up, click and hold the mouse button in the center of the screen, then drag towards the sides and release, this should unlock the device.
Try these steps first, if they don't work then there is likely a problem with your AVD configuration.
If you are launching your app first time with emulator, it will take appropriate time.After that, on Lock icon click and slide to the right. then you can view you application. If not check for your app(icon) installed.
By seeing your configuration of PC I think it will take some time to load emulator. After emulator is load (see below image)
then and then run your code and also check in eclise-device that whether emulator is online or not.
For checking emulator in eclispe :
In second image just above windows logo you can see small rectangular button with plus sign click on that you will get list from which you can select devices. You can find similar button in you eclipse at the bottom.
I had the exact same problem and followed the exact same steps, but was also unsuccessful. I ended up creating a new AVD with a Nexus 4 instead of the latest Nexus 6. The resolution of the 4 is much lower, which I think is what solved my problem. It loaded much more quickly using the 4.
Also, When I was using the 6, I could only see "ndroi" because the size of the screen was much larger than the size of the phone. Now I can see the full device.
vs.
You may just need to relaunch the Android studio 3.6.3.
I got a similar problem. The hello world app does not install on the emulator.
Problem solved after relaunch.
i searched the web to find some guides how to increase the capacity of the internal memory of my virtual device, no luck so far, since i think their talking about the memory of their real phone, not the virtual device.
my problem is after adding some few files on my app, once i run the project as android project, it is having errors like:
[2011-07-18 12:04:28 - testproject] Failed to install testproject.apk on device 'emulator-5554': device not found
[2011-07-18 12:04:28 - testproject] com.android.ddmlib.InstallException: device not found
[2011-07-18 12:04:28 - testproject] Launch canceled!
and i can't test if my codes are running correctly since it won't install the app..
i know you can immediately program the app to install itself on the SD card instead of it using the internal memory of the phone, but i just want to end this problem of mine, can i really increase the size of the internal memory? or the size of the internal memory is already fixed? depending on the android platform, i use android 2.2..
i also tinkered through the hardware of the avd adding and increasing the value of the hardwares, no luck, so if someone could just give me advice or assist me on this problem of mine i would be grateful, since i can't continue my study of the android technology because of this minor setback, thanks and godspeed.
Look here for more specific answer on how to start emulator from command prompt with -partition-sizeparameter
Start the emulator from command line with -partition-size parameter.
My developed android application can run on emulator fine but when I export it to .apk and install to my galaxy S it very slow to show any content.
My application have to connect with web service and database that run on localhost. I try to move web service and database to another host that faster but it doesn't solve my problem. Any one can suggest me what should I do?
Thank you for any suggestion.
Ps. I develop my application by using Java with Eclipse and Tomcat
Use traceview to inspect which parts of your code are slow. Than optimize those parts.
If you use slow external services (network calls) you might want to use AsyncTask to run them in the background. Also, it's good practice to show some kind of progress notification to the user so that they know something is being worked on.
To find the bottleneck of the program, use Traceview on the device. It can be started very easily in the Eclipse IDE.
Most likely you are running the Emulator sharing the high-speed connection of your PC running the emulator. The device will have lower bandwith and also a large delay.
Most time is usally spent receiving data. Compressing transfers thus actually speeds up the app. Compressing the answer is straight-forward both on the server and the client, see for example this answer.
If this is not enough you need to look through what is sent from the server and see if some things can be pre-fetched or omitted.
Database operations in Samsung Galaxy S are terribly slow (especially after 2.2 update). If the app performance is fine on the emulator then it should work fine on other devices too
You will have to elaborate on this a lot! Sounds like you are using an outside DB. how are you interacting with it? Async? how is the data being passed around?
Need more info.
I have an L6 phone from motorola, a usb cable to connect it to my computer, and the Tools for Phones software so I can do things like upload my own custom ringtones or download pictures from the phone's camera.
I have some ideas for programs I'd like to run on the phone, and it supports java, but I don't see anything in the software that I have for uploading them. Even if they did, I wouldn't know where to get started.
Does anyone have any info on how to get started building apps for this or similar phones?
I've never used Morotolla's SDK but from my limited work in JME the real hook in the 3rd party tools are the emulators. Setting up a JME dev environment quickly is something that Sun got surprisingly right. Just get NetBeans with the JME pack and there is a regular emulator right in the IDE, and then you can hook in other proprietary emulators such as those from Motorolla.
Not sure what kind of apps you are looking to do, but if you're interested in games I thought Beginning Mobile Phone Game Programming was a great starting point:
Perhaps Motorola's own site
link
I have not used the new Motorola development studio, because my experience with Motorola's development tools has not been a joyous one. When working with Motorola devices I tend to stick to the standard emulator (or sometimes the Sony Ericsson emulators as those are the best I have worked with by far).
The problem with Motorola's tools is that I always seemed to spend way too much time trying to figure out how to work around them. I would run into emulator specific issues and bugs, and I honestly don't have time to waste trying to figure out why the application runs on the target device but crashes on the emulator. It should be the opposite.
A good emulator is very important for mobile development though as that is where you will do 90% of your development, testing and tweaking, only periodically trying it out on the phone.
Finally, I agree with bpapa...Netbeans is an excellent IDE for J2ME development and here is a book that I recommend (get the original if possible, not the second edition as the second edition focuses way too much on MIDP 2.0 and assumes you know the basics).
http://www.amazon.com/J2ME-Game-Programming-Development/dp/1592001181/ref=pd_bbs_sr_3?ie=UTF8&s=books&qid=1221692983&sr=1-3
Yeah, the act of asking the question pointed me in the direction of an answer, and I found this:
https://developer.motorola.com/docstools/motodevstudio/
I could still use some pointers from someone of what to expect if anyone has done this before.