installing any sdk platform for android studio takes very long time - android-studio

I totally beginner in regards to android apps and android studio and I am trying to learn Kotlin and for that I installed Android studio on Ubuntu 18.04 but when trying to install any sdk platform it takes very very long time to complete installing ( the window indicate "installing XXXX" ) is there any way to speed up the installing?
for example Installing Android SDK Platform 24 takes too long
My laptop specs:
core i7
8GB RAM

Getting set up with Android Studio can take a while, usually the download takes the longest time. Expect to download 1-2 GB. You definitely don't need all the SDK platforms, only the latest (currently 28), and you don't need the NDK platform either (unless you're writing in C/C++, which if you're new to Android development is unlikely). You can also avoid downloading an emulator image by just running your app on a real device.
Try going for the minimum amount of things you need to install to get a basic "Hello World!" app running, Android Studio will prompt you if you need to download anything else.
It could also be that your computer is struggling with its memory limits; 8GB of RAM can be tight if you have other programs running on your laptop as IDEs tend to be pretty heavy. Consider upgrading your RAM if you're serious about Android development, 16GB is usually plenty.

Related

Why is Android Studio so slow after update to Android Studio Electric Eel | 2022.1.1 Canary 8

I have updated my Android Studio to
Android Studio Electric Eel | 2022.1.1 Canary 8
Build #AI-221.5921.22.2211.8786657, built on June 30, 2022
Runtime version: 11.0.13+0-b1751.21-8125866 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 12
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
ide.images.show.chessboard=true
Non-Bundled Plugins:
com.android.aas (3.5.1)
and now it is extremely slow to respond to any code change, e.g. it takes minutes to properly highlight any code following the simplest of refactors.
i have also noticed that it is showing git information within all my code files.
I do not know how i have configured this change, however i have a feeling its because of this git integration that my development is now painfully slow.
has anybody else experienced a degradation in responsiveness since updating to this latest version of android studio?
how can i get back to being able to be productive?
I upgraded to the release version of Electric Eel when it prompted me I have just gone to the downloads site to download Dolphin again as it's running really slowly.
I make a change and then sit and wait for it to take affect before I make another. I'm posting this as a warning as I found this thread when I was searching for why Electric Eel was so slow.
If you've done the same as me you can download the old versions at:
Android Studio Archive
Beacuse this is a Canary Build of Android Studio, the perfomance can not be expected to be on par with the other versions. The best thing you can do is to consider downgrading to Android Studio Dolphin until the new version is in stable release.
Also the sluggish performance can come from the new Live Code feature:
Live Code
that makes building obsolete. Due to the feature not being finished, it might be that the coding experience you have might be bad.
I upgraded last week to Electric Eel, but it is consuming almost 3GB, and even with that amount of memory it responds to a lot of tools VERY slowly (i.e. working on xml files)
It takes several seconds to show any option.
On the upside: Seems to me that contextual documentation loads faster.
Going back to Dolphin until this gets better.
UPDATE
To completely uninstall Electric Eel I had to download the zip file of an old Android version (old versions are in https://developer.android.com/studio/archive, I downloaded Android Studio 4.1 Canary 2) and use that uninstaller.
I installed Dolphin afterwards, but spent several hours trying to install my app in a physical device...Dolphin always got stuck in the build phase, but no message saying there was something wrong. I thought it was the ADB, but no, it was detecting correctly the phone. I tried with another app I developed and it worked OK.
So I decided to upgrade Dolphin to Electric Eel again, to see what changed, and after starting up Electric Eel showed a window saying that my project was built with AGP 7.3.1 but synced with 7.3.0. I synced it as recommended and I could install it again in the phone.
I post this in case someone faces the same situation...
Now I am again at Electric Eel, checking if it behaves better...

Problem running the Android Studio emulator on AMD CPU

Recently I decided to learn android dev with Kotlin, I installed JDK, the latest Android Studio release and other stuff but my CPU is AMD so I cannot install intel's HAXM which is required to launch the emulator . I want to know if an equivalent for pc with AMD exist
For your problem there are several ways to fix the issue.
Android Studio with Android Emulator Hypervisor Driver for AMD Processors Tools(Recommended)
Here's the full document
Go to Android SDK -> SDK Tools -> Check Android Emulator Hypervisor Driver for AMD Processors also make sure if they're installed they're updated, since this solution got a problem with using NOX player at same time, and causing Blue Screen of Death
Then go to App & Features -> Turn windows features on or off -> make sure Hyper-V and Windows Hypervisor Platform are disabled. All Windows features enabling Hyper-V either explicitly or silently must be turned off.
Other solution is to use Nox or Bluestack emulator. i prefer nox since idk why but bluestack using so many resource, and also nox multi-instance is also working very well for using several emulators and it's got 3 version of android (4, 5, 7).
Common issues while using nox when trying to develop flutter app or etc is sometime emulator won't appear in your emulator list in android studio which the solution is that you should copy your adb nox file to your android sdk folder. or address the PATH VARIABLES to use nox adb.
Good Luck.

Sluggish Android Studio Start up

I have Android Studio 3.0.1 with latest JDK installed on my i7 (4th Gen) dual core Win10 machine, 16GB RAM, 850 Pro 512GB SSD. But even with this beastly configuration, when double clicking on the Android Studio icon to launch the application, the software feels very sluggish in starting up. Takes approx. 15-20 odd seconds to just start up and then do the Gradle build of last opened app, which takes another 30-40 seconds.
Have set the vmoptions & gradle.properties to use -Xms2g and -Xmx4g along with parallel build, offline gradle execution and configureondemand.
Is there a way to drastically improve this performance when I have such a good machine configuration, probably tweaking some other Windows / Android Studio level parameters? Please help.
It start in seconds only because of that configuration.It takes few minutes to start in my laptop with 8gb ram.
So the time you mentioned seems pretty good.

Android Emulator won't start after Android Studio 2.0 upgrade

I recently upgraded Android Studio to 2.0 (Windows) which broke the emulator.
The symptom is that the emulator starts a (single thread) process that takes about 100% of its CPU. Nothing shows on the screen.
Of course, this worked like a charm before the update.
Few things I tried:
Used an AVD created before and after the update
Increased AVD memory to 1G
Delete / Install Android Studio
Used different CPU Architecture (Arm & x86)
Used different versions of API (21 & 23)
I had the same problem I had to reinstall android studio all over again, After that open your SDK monitor press on launch stand alone SDK manager, There scroll down and check if the emulator is installed properly if not install it.
I hope this answer helped you since that's what I did and it works.
A temporary solution:
Go into the AVD Manager, select the Virtual device, and click "Edit"
Find "Emulated Performance" -> Graphics, and switch that from auto (or hardware) to Software.
It won't have quite the performance, but this worked for me. Seems to be that Android Studio 2.0 doesn't play well with certain graphics cards or something.

Rendering error

Apologies for the generic title but I'm not sure how best to explain this one.
Visual Studio is rendering badly in a number of locations, notably the Quick Watch window, Unit Test Sessions window and the Unit Test context menu, see screenshot at the below url. It has been this way since I installed Visual Studio 2012, the OS at the time was Windows 7 and I upgraded to Windows 8 recently so it is not a Windows 8-specific issue.
This is Visual Studio 2012 on Windows 8 Pro. The machine is a Core i5 with 12GB of Ram running at 1% CPU and 3Gb of Ram used so it's definitely not a problem with lack of power, which is the only time I have ever seen any rendering faults like this.
I have tried a repair install and also uninstalling and re-installing Visual Studio but it has made no difference.
This issue occurs solely in Visual Studio 2012, not in any other applications on the computer nor on VS2010 when I had that installed.
Some frantic googling has revealed nothing and I am out of ideas.
Solution
Downloaded some old Vista/Windows 7 drivers from here which solved my problem.
The most likely culprit is the video drivers. I'd confirm by switching to the Basic VGA Display driver to rule out video driver issues.
If this fixes the issue, I'd look for different video drivers or report the problem to the card manufacturer.

Resources