I have read a lot of complaints and problems about Android Virtual Device (AVD) taking a lot of time to load, but people were often talking about just few seconds delays.
In my case, it takes about 15 minutes(!) to load, and even then it also freezes or reacts very slowly. I have already un- and reinstalled once, but nothing changed.
I also have problems with Eclipse, but I am going to post a separate question for it.
I am running it on a slightly old PC, with Intel Core Duo CPU, 2 GB RAM, plenty of HD space, Windows XP SP3.
Do you think the problem is in having too little RAM? Is there a log file somewhere that can help me in understanding what is going wrong?
Thanks
2GB RAM is not much, but you should be able to run the emulator with it. Try to close as much other programs as possible before starting the emulator.
It is my experience that the AVD startup time increases with the amount of virtual hardware you add to the AVD, so keep this simple. Also I noticed that Android 3.0 or higher AVDs can be rather sluggish in the emulator compared to the 2.x versions. However, their performance might improve if you increase the "Device ram size" and/or "Max VM application heap size" hardware properties (see also this post)
I found some other tips in this post but I didn't try them myself.
If you have Eclipse up and running you can check the logcat while the AVD is starting.
Related
I use Unity (2019.4 LTS) for developing an application for Microsoft HoloLens 2 as the target platform. To do so, I added MRTK (Version v2.5) to my project to use some of the libraries. I regularly get errors in the console that look like this:
[XRInputSubsystem] A device disconnection with the id 2000000037 has been reported but no device with that id was connected.
It seems to happen somewhat randomly. At first, I thought it was disconnecting or something, but then I realized it was just pausing Unity, and I can click 'play' several times to bypass them. This workaround is annoying and slows me down though. Does anyone have an idea for solving this issue?
I solved this error only by increasing the bandwidth of my Internet network. This error happened when my Internet bandwidth was 9MB per second. Now, I use a stronger bandwidth of about 70MB per second and I do not see the same error at all.
I am creating a new AVD within Eclipse, Android dev. tools 21.0, and it would be great to have some explanation on
"Memory Options" (RAM and VM Heap), "Internal Storage" , and "SD card".
(I am sorry but since I am a new user I am not allowed to post a snapshot image)
I would need:
- the meaning
- the unit of measure (for RAM and VM heap are not displayed)
- criteria to choose the values
Thanks
First to clear up some possible confusion, Eclipse doesn't exactly have its own AVD creation mechanism. It has a plug-in which calls the Android Vitrual Device Manager. The AVD Manager can also be accessed from the command line using "android avd", and comes as part of the Android SDK (so this question isn't specific to Eclipse users).
As for the definitions:
Internal storage
Built-in, non-removable file storage capacity. The operating system and most apps will be installed here. When you see a device advertised with 8GB or 16GB, this is what that number refers to.
The AVD Manager allows you to select Gigabyte or Megabyte.
The choice is up to your needs and the amount of space you have on your hard drive, but you'll probably want a bare minimum of 200MB. 2GB will probably be more than enough. If you run out of space you can always add more or move files to the SD card.
SD card
Similar to Internal storage, but refers to the storage an Android device would have access to on a removable memory card (the same kind of card digital cameras use). This is the place for storing user files, including documents, music and video, but some applications are built to be stored here.
The AVD Manager allows you to select Gigabyte, Megabyte, or Kilobyte.
Again, this uses space on your computer's hard drive, but this value is completely optional. You can safely leave this blank until you need to test how your app uses external storage.
Memory Option- RAM
Available working memory, used by the operating system and any running applications. This directly affects how many apps can be loaded at the same time.
The AVD Manager expects a value in MB.
This uses your computer's RAM, which is a limited resource so you don't want to use too much. I'd say the current range to play with is 256MB to 2024MB, so your sweet spot is likely either 512 or 1024.
Memory Option- VM Heap
This is a more advanced topic which is way out of scope of a beginner question. For simplicity's sake I'll just say that where RAM is related to the sum of running apps, Heap is related to an memory available to each individual app.
The AVD Manager expects a value in MB here as well.
For a reasonable value, refer to this question which lists real-world values: Android heap size on different phones/devices and OS versions
For much more information on memory, refer to the Android Developer site (http://developer.android.com/training/articles/memory.html)
There are a few utilities out there that help you undervolt your cpu. For the PC, for example, there is RMClock. For the Mac, there is Coolbook.
On the Cookbook website, however, it states that it is incompatible with OX X 10.7 Lion, and the i3/i5/i7 processors. I am interested in replicating the functionality of Coolbook, which works with OS X 10.6 Snow Leopard, and the Core 2 Duo processors, but for the newer OS and CPUs. I really have no idea where to start. As far as I know, Coolbook holds a monopoly on the Mac platform, and I was wondering if there is even a hackerish way of accomplishing the same functionality? What are some resources that you could point me to so I can begin understanding what is going on in the driver level when adjusting the voltage of a CPU?
The Problem is, i7 Cpus have no possibility to manage the voltage via software. The reason is simple. Intel has cut the external register address for voltage management, only AMD cpus has the possibility to manage voltage via software, or older core duo intel cpus. Coolbook wors but not very well on OSX Lion on older Intel CPUs, there is no update for Lion at this time. I hope that help.
I have used this on my Android phones. Not sure how it would work on a mbp but they are both the linux environment:
echo> 0 /sys/devices/system/cpu/cpu1/online
On my phone it stops the phone from using the second core and saves a little battery life. Hope it helps to reverse it. Just replace the 0 with a 1 (you must be a superuser for this to work).
I am trying to find a NullPointerException that I get when in my app the phone release memory. I was testing on a Samsung G3, but now that I have change for a GS2 which has more RAM memory, the variable is still there when I minimaze/maximize.
Is there any way to simulate my old phone and his limited RAM memory? A bit ironic,but now I miss it...In the SDK emulators I can set SD card size, but not the RAM, which I guess is the key problem here.
There is a program on the android market called CPU Master. You can set CPU speed so then you can test your program as in a phone with limited resources.
I want to know the feasibility of these things:
1) Is it possible to download 200MB audio files to our application?
2) How much RAM can be accessed from an iPhone app? What is the largest amount of RAM an app can expect to use?
Anyone's help in this regard is deeply appreciated.
Thanks to all,
Monish
1) Yes, although you might make users angry who are not on Wifi + fast DSL. Also you will need to handle interrupted downloads.
2) No, since ARM is a 32bit processor a maximum of 4GB RAM can be addressed. Anyhow, iDevices have a maximum of 512MB right now (iPad 2). Your application will get killed by iOS if your app takes about 75% or so of the available RAM which means in reality you shouldn't use more than, say, 80MB of RAM. And if you need to address 8GB then your design is totally flawed to begin with.
There are always ways to work with a lot less (e. g. either by using better algorithms and/or by caching to disk). On the disk, you are only limited by the available space left on the device. So if you have an iDevice with just 8GB you're naturally out of luck as the system itself and other apps/data are reducing the available space. Same if you're on a 64GB iDevice which is packed with movies. You will need to be able to work with the space that is available. You can, for example, try to "reserve" the necessary space by creating a file and making it as big as you need it (via a seek and a write) but be prepared for angry customers.