Slow Android Studio 1.3 - android

Android Studio 1.3 latest stable update is very slow compared to its previous version 1.2.2.
I have updated Android Studio from 1.2.2 to 1.3 and it just gone slow.
It actually scans or compile or something like that all the time while typing. Its good but scanning too much makes it slow while typing.
Even it hangs for a second or two while I type something in comment.
So I want to know whether I can do something to improve performance.
I can't downgrade :-(
My previous version was working better. Also latest version (1.3) takes lot of time for Gradle Build.
What should I do ?

I would say to work without problems with Android Studio you need a Quadcore, 8 GB Ram 1600MHZ at least and at least a Samsung 850 Pro SSD.

I have solved my problem by just increasing RAM from 4GB to 6GB. Actually I was also using Genymotion which consumes almost 1GB ram and makes my PC slow. So now I have also updated Android studio to version 1.4 and updated RAM to 6GB.
Now everything working perfect and fast Android studio as well as genymotion.
So according to me it was only a RAM shortage.

Related

Emulator not able to run on MacOs. Emulator claims that OS is out of date

After installing the latest update today I started to get this error:
Emulator: Sorry, "qemu-system-x86_64" can not be run on this version of macOS. Qt requires macOS 10.12.0 or later, you have macOS 10.10.5.
I'm trying to emulate it on a Noxia 4. I've deleted the virtual device, and recreated it a couple times to no avail. This is consistent with all my projects. I haven't found an answer to this issue anywhere, and I don't know if it is actually out of date, or if it is just saying that. I was wondering if anyone had this issue in the past.
My reported MacOS version is correct. I'm on 10.10.5 Yosemite.
I've encountered the same error a while back. My macOs was not so drastically outdated though. If you have installed the newest emulators - they are dependent on version of Qt different that is installed in your system(or maybe there is no Qt installed at all - I am not an expert in mac infrastructure).
To fix this issue you may try several approaches.
Try to install the old version of emulator you want to use - the one that is compliant with your current macOs version. Android Studio before 3.5 can work with ancient emulators. I haven't tried with 3.5 and up though.
Try to install needed version of Qt in your system. The current version is 5.12.
Update macOs to the newest one and use the newest emulator.
I haven't tried first two, but the third one fixed my issue.
The error message is pretty clear about it:
Qt requires macOS 10.12.0 or later, you have macOS 10.10.5.
This would be DMG image, which performs the necessary OS upgrade. Later versions would also work, but this one is the least required to run Qt. The fear-mongering in that deleted answer might not be justified (fear disables logical thinking - that's why fear is not a good adviser). It's just a minor version update, which is something else than installing the next major version on yesterday's hardware. The Inkscape installer claims to support version 10.7 (which is already elder than the current version 10.10.5), so that claim might be a hoax - and even if it's true, building from source should still be possible. If still in doubt, just use the time machine to create a snapshot before applying the OS update (in terms of: better safe than sorry).
I found that I still had an old version of Genymotion (v. 2.5) lying around. I hadn't used it for years as the built-in Android Studio emulators had become much better.
But it looks like Genymotion works! I don't dare upgrading it since IT WORKS now, so I don't know how helpful this answer is to others.
This is a solution for people who need to stick around with older versions of Mac OS (OSX). The rest of the mac users should abandon all their old software and embrace the new operating systems, happy that their workload will be greatly increased. Thank you Apple!

My mac suddenly freezes while using Android Studio 3.2

I am doing the Android Basics: Data Storage course on Udacity, and I have almost finished this course, but since about a week ago while using Android Studio and doing everything that the course teaches me to do, at some point Android Studio completely freezes my Mac OS and that forces me to reboot my computer.
This problem happens at any time, literally. There wasn't anything special that Android Studio was trying to do when this happened. Many times I have been just writing some code, and it freezes, not running the project, downloading something in the app or checking anything special, it just suddenly freezes.
I am using Android Studio 3.2 (latest version) in a MacBook Pro (13-inch, Early 2011). It also happened before I update it to Android Studio 3.2, when I had the previous version I thought I could be fixed by delete Android Studio and download the latest version, but it did not work.
I have a solution for this problem.
I seem to have a problem occurs with the Java version of Android Studio crashes
So check your Java version. I think you are using JAVA 1.8
Please remove all java on your system like below.
sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.8.0_80.jdk/
then download and reinstall latest java 1.8
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
I will hope you can resolve this problem
If your machine freezes, it could be due to either you open too many apps that consume much RAM with Android Studio, hence when Android Studio needs some more RAM to operate (i.e during gradle build or instant run), the machine could not provide sufficient RAM hence, Android Studio will freeze: or your machine does not meet minimum system requirements for Android Studio, for this information, you can check the official documentation https://developer.android.com/studio/ . Also, in order to manage memory usage, have a look on this link https://macpaw.com/how-to/reduce-memory-usage-on-mac
I had something similar after updating to 3.2.
Wasted 4 hours trying to fix it and eventually followed these instructions to totally wipe AS from my PC.
How to completely uninstall Android Studio from windows(v10)
I understand that you have MacOS but it wouldn't be too difficult to locate the directories there.
For those who are looking for a solution when is using tabs just is because
Android Studio freezes on macOS Big Sur. On machines running macOS Big Sur, Android Studio 4.1 might freeze when you open a dialog.
To work around this issue, do one of the following:
Go to the Apple Menu, select System Preferences > General. In the Prefer tabs when opening documents option, select "never". Then restart Android Studio.
Upgrade to Android Studio 4.2, currently available in the Beta channel.
Otherwise, wait for the Stable Android Studio 4.2

android studio on a machine with less than 2GB RAM

My laptop is a bit old...only 1.8GB RAM....Android installs good but when I load a project it freezes with the gradle stuff.
I tried android studion on Windows XP, Ubuntu, tiny core, puppy and now lastly BBQLinux. Each of them have same issue freezing at the gradle stuff...except windows xp which says something like '%1 is not a windows application'!
My question is that can I use swap as RAM, how to enable swap in BBQLinux? Will it make a difference? or is there another alternative?
I don't want to upgrade laptop as I just want to build a simple app for my phone.
Thanks.
Android studio takes more memory as well as internet because Android studio is capable of handling all the dependencies automatically (using gradle just like maven in java EE). All tools that does debugging on the real time occupied memory and process cycles. Also the emulator UI quality improved in Android Studio emulator in comparison to Eclipse. So threads and processes takes up huge amount of memory space.
If you still want to lessen the memory issue follow this link hope that will help you

Android Studio is incredibly slow and laggy

Android Studio is painfully slow. It's not just the Gradle build times (which I have seen reach 40+ minutes before I cancelled), it's the whole IDE and my whole computer slows down when AS is open. When I click anywhere in AS, whether it's inside the code or menu items or anything else, it takes seconds to respond.
I uninstalled Eclipse because it was too buggy. AS isn't as buggy but it's way too slow.
Here is what I have tried so far:
Made sure I'm not in presentation mode
Tried both having Compile independent modules in parallel ticked and unticked - slow on both
Changed vmoptions to have -Xmx2048m -XX:MaxPermSize=1024
Ticked Make project automatically
Ticked Use in-process building
Ticked Configure on demand
Ticked Offline work in Gradle
Added --offline in Command-line Options
Added Thumbs.db in "Ignore files and folders" (Editor -> File Types)
Added org.gradle.jvmargs=-Xmx2048m, org.gradle.daemon=true and org.gradle.parallel=true to gradle.properties
Made sure I'm adding only the google play services libraries that I need
None of these solutions helped so how do I fix this? Please don't link a post if it just has things I've tried above.
Like karun already said, an i3 is definitely too low powered to run Android Studio. I'd recommend at least an i7 2ghz or faster, paired with a pure ssd storage (spinning disks are horribly slow in comparison). 8gb RAM is the absolute minimum, 16gb or even more would be better. Android Studio is a heavy-wight IDE and it uses a lot of memory, especially when running gradle in parallel mode.
With such a setup, it still doesn't feel what I would call "fast", but it's OK, regarding all the tasks going on at the same time.
If you want to keep the i3, then the best you can do is to equip it with as much RAM as possible. Also replace your disc (if it's a spinning one) by a fast ssd drive.
This is not a solution, but i think i3 processors are not much powerful to run Android studio smoothly. I had i5 processor and 4GB ram, and I couldn't run chrome and android studio simultaneously with ease but now I've upgraded my ram to 8GB, which helps a lot, still the laptop freezes a bit when the gradle files are being built but other times every thing runs smoothly.
Did you also check -Xms2048m in vmOptions?
This affects the initial ram your android studio takes from the system when loading. The other setting you have (-Xmx2048m) affects the maximum ram android studio can get.
Also setting (-XX:ReservedCodeCacheSize=1024m) helps.
I have a few things for you to try out:
Try an older version of android studio.(If the only thing you want is performance).
Try using a physical device instead of a virtual machine.
Try using a lighter operating system (like lubuntu 18.04). Windows on my computer takes 1 gb when idle while lubuntu takes 1.2 gb when android studio is running
If none of the above work you should consider upgrading your computer.
I personally use a core 2 duo E8400(2 cores,2.83 ghz) with Lubuntu 18.04 and 2 gb ram and android studio 2.3.2 (my computer is so old that is why :)) and it runs flawlessly but you have a core i3 and 4 gb ram which can run higher versions.
NOTE: If you are using Kotlin DO NOT use android studio 2! it does not have support for Kotlin if you use java or c++ go ahead (although you may give up some features.).

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?

Categories

Resources