Android Studio Takes too long time to run the app on real device

how to run android studio faster in 4gb ram
android studio gradle build running forever
android studio too slow on mac
android studio takes long time to start
why does android studio take so long
android studio run build too long
android studio indexing taking too long
gradle sync taking too much time

I have a Laptop with a Core i3 processor and a 2GB of RAM, and I am using my Sony Xperia C as an alternative to the Emulator. When I click on debug and choose my mobile device, the Gradle starts building and it takes about 5 to 10 minutes to finish. I understand that I have very low resources but I doubt that there is another reason why it takes too long time to finish building and running the app.

I noticed in the logcat tab that it is spending the time on sending a request and waiting for a response repeatedly..

Can anyone tell me if the problem is with the hardware resources or my doubts are true about the cause being something else.

Android Studio is very resource hungry. I use an old Sony with Core 2 Duo and 2.5 GB of RAM, with tweaked system that running about 200MB for the operating system. It takes about 10 minutes or more to build a project.

My suggestion, upgrade your Laptop RAM to 4GB or more. 8GB should be enough. Now I'm working with 4GB and Corei5 where Android Studio take about < 1 minutes to run a project, but it depends of the project size and its dependencies.

-- UPDATE --

Default setting of Windows 10 will use about >90% of your disk which will make your building process much more slower. You could decrease it to <12% by simply turning off "Show Me About Windows":

From the Windows Menu, go to Settings, then go to System and then go to Notifications and Actions. Turn off "Show Me Tips About Windows"

update reference: Disk usage always at 100%

Why your Android Studio takes forever to build-Part 2, You never have to wait for long to successfully build your android projects. requires a full APK build each time you want to run a change — although the actual Deploy your app to a device running Android 5.0 (API level 21) and higher by  In the Previous Article We have Discussed about How To Install Android Studio and Running your First Basic App. We now Discuss in detail about How to Test or Run the android App on real devices like Android Mobile, Android Tablet. There are Two Ways To Test an Android App: Using a Real Device, To test Android App using Real Device such as

I would strongly recommend that you either upgrade your development machine's RAM (8GB or more) since 2 GB ram will be too painful for studio.

Also I recommend: open single project at a time and clean your project after running your app in emulator every time.

Optimize your build speed, Optimize your build configuration by taking a few steps that immediately When developing your app, you should deploy to a device running Android 7.0 However, this process can be time-consuming for large projects. APK build every time you want to run a change—even though the actual change  In the beta version of Android studio 2.0, they've rolled out a feature called Instant Run. It reduces the build time by a big factor. It reduces the build time by a big factor. The core concept is, Android Studio only pushes the small changes made into an already running app.

After upgrade your RAM, you should try to upgrade Android Studio. In Android Studio v2.0.0 ++ , they support Instant Run

Android Studio now deploys clean builds faster than ever before. Additionally, pushing incremental code changes to the emulator or a physical device is now almost instantaneous. Review your updates without redeploying a new debug build or, in many cases, without restarting the app.

More info about Instant Run

Is Your Android Studio Always Slow? Here's How to Speed Up , As an android developer, we get to spend a huge chunk of our time on Android Studio, the Google's official compiler for developing native Android apps. Let's see how to speed it and make it faster in some very easy ways. According to Android Studio's official system requirements, it takes at minimum 3 GB RAM to run  The trick here is that the factory emulator needs to run on an ARM machine, so it needs to convert the ARM calls to your your x86 (or 64 bits) processor calls. It's likely to never run fast at all. In this situation, you may want to trust on the factory x86 images that make use of Intel's HAXM drivers, not available to everyone, and I couldn't

In my case, I don't use debugger for monitoring app performance ...etc, So I do not install app to device (I build application only instead of run), then I use adb to install apk to device ...

adb install -rst <$$path_to>.apk

path_to_apk is where my apk gets built Usually ...

<$$build_path>/android-build/build/outputs/apk/my.apk

I get things work with a reasonable speed , offcourse, on the cost of debugger! I am then trying how to activate debugging from adb! if possible and needed.

How I reduced my Android build times by 89%, I will explain how to make your Android build time lower than the Open in app I reduce the whole build+deployment to device into one command! coding on small-average android projects the build times would take 6–10 minutes. a bunch and saw a drastic change in builds run from Android Studio,  Android Studio no longer seems to be detecting when an app has installed on a target device and opened. It gets stuck on "Installing APK" and the progress bar is empty. There are no errors, the apk successfully installs and opens, it's just the IDE is still showing "Installing APK" and it does not automatically connect the debugger.

I recommend that you upgrade your ram so that your Android Studio will run normally (Technically speaking: It will have enough resources to use). I use a core i3 4gb RAM system and it feels a little slow to me too.

Check this image...

Kill some background processes and then start your android studio (This is a temporary solution) or upgrade your RAM.

Android - Emulator takes a long time to start up, Generally, I test application with my real android Device (HTC HERO) so it is fast to test an application on a real device. But when I try to run the emulator with an  Tell the customer support representative that the device won't connect to Android Studio using ADB. RSA security key. When you connect a device running Android 4.2.2 (API level 17) or higher to your computer, the system shows a dialog asking whether to accept an RSA key that allows debugging through this computer.

How to Install Android IDE and SDK and Get Started with Android , Running on "actual" Android phone/tablet requires much lesser resources. The installation and many operations take a LONG time to complete. by default, the "Android Studio IDE" will be installed in " C:\Program To run your Android app under an emulator, you need to first create an Android Virtual Devices (AVD). I'm trying to run a hello world flutter app for the first time on my device, but when I hit run on android studio, it shows initilizing gradle, and it stays like that for more than 20 minutes with no logging or error, I have an intel i5 as a CPU and I'm running it on Linux (dual boot, my download speed is quite slow (200 kb/s average download

6 Ways to Supercharge the Android Emulator, Better get comfortable, because the emulator takes a long time to load. Only start and restart your app from Android Studio, and not from the target device. that Windows Defender Real-time Protect can cause Instant Run slowdowns. How to fix slow Android app installations. a wireless network DNS does your Android device no favors. The problem lies in the fact that you don't always have access to the necessary

Android Studio for beginners, Part 3: Build and run the app , Build your app with Gradle, then run it with the Android device emulator. Now, Part 3 will take you through the steps to build and run the app in an app on an Android device emulator or an actual device, in this case a Kindle Fire tablet. Fortunately, the next time I ran Android Studio 3.2.1, I observed an  Android Studio is taking too long time to build gradle, refresh application files etc. I have tried to run it in offline mode. Then the gradle sync is getting failed. I don't want to use the Internet connection for running applications in Android Studio.

Comments
  • Gradle is a very heavy build tool. Even on my work I7 laptop with 8GB ram, browsing the web will lag if I have a gradle build running. The most you can do is try tweaking a couple of settings, (see stackoverflow.com/questions/17324849/…) but that doesn't always provide much of a performance increase.
  • Thank you, but why would the RAM be the problem if I still have a 500MB free while Studio is running since I am debugging on a real device. isn't the problem related to CPU?
  • Ram is kinda complicated. One reason however would be that Android studio runs inside a Java VM, which manages all the ram. 500mb free is pretty low, especially for a development computer.
  • You are totally right :(
  • Hmm.. but why do you think the problem is with the RAM? I coped it by running the app or a real device, and I still have a plenty of 500 MB free along with Android Studio running on Windows 10.
  • Well because you only can use about 1GB. The other 1GB is already by Windows 10. Windows 10 requirement is about 2GB for for 64 bit Windows 10 Requirement, that's the minimum requirement for working. imho, Windows 10 locking some memory space for itself. The memory space is reserved for internal process.
  • I am running Windows 10 for 32 bit. in the task manager it is labelled as process "System" taking 260MB, and I was doing experiments on using Emulators before running on my real device. I could use 98% of memory when I had the Emulator (512MB) + Android Studio + Win10 all working together. the remaining 2% i think is due to lack of memory addressing by cpu
  • Well, process labeled with "System" is not representing for all Windows 10 processes. Add a column "Publisher" in your task manager, and see the processes with "Microsoft Corporation" label. Please check about the VM that Android Studio use. Maybe it will give us some clue. But I can't tell you more about it. I only use Windows 10 in my office. My main os is Linux :)
  • Note that sometimes Android Studio takes too much time just to install apk to device. And it often happens with me..:(.
  • imho, cleaning a project will be a bad idea because we must rebuild it again and it consumes more time. Only clean when we sure that something wrong with Android Studio, like unupdated resource file in project or unupdated dependency.
  • I've downloaded it yesterday, I will look for this new feature soon. thank you
  • Instant Run is really a good plugin. But be aware, sometimes it not working. And in some devices, your app will not working when installed.
  • i may use it only for testing purposes, when I get the final work done I will switch to ordinary Build and Run. is this feasible?