Using Android Studio with minimum disk space - android

I have limited disk space and want to start developing android, but it seems that android studio eats a lot of memory! some says it took more than 20 GB.
So the question is: what are the minimum necessary components (android platforms, emulator, ...) to start and how can we use android studio with the most possible minimality?
Also, how does adding each of these components (that are respectively unnecessary) affects the used space?

2G RAM for AS, 1G RAM for Gradle,
~8G HDD for SDK (incl. NDK),
700M HDD for AS,
~2GB HDD for AS config and caches,
~500M HDD for one project + whatever emulators take
As Eugen Pechanec said as a comment.
I think this is the maximum.

Update
Note the link for updated requirements. Those listed here are minimal recommendations by Google. More RAM and Disk space have always been better in my experience.
Requirements as of Nov, 2015
Just check out the Android Studio system requirements. You will probably need 4GB RAM and 2GB of disk space to run the Android Studio platform minimally (this is Google's official development platform for Android devices). You can start by downloading the IDE at the developer website and also pickup some samples. So the samples will also take up disk space. Depending on how many versions of Android you intend to support you could be using a lot of disk space for the SDKs and emulators, so you should consider carefully which versions make sense to support.
You might also want to take a spin through the default training site.

Hello friend its true that android studio take lots of space while running, and emulator takes lots of memory so better way to run the program is on Android device, Go to the settings --> Developer options --> USB debugging (ON) if your phone didn't show developer options then Go to --> About device --> and click 7 to 8 times on Build number, it enable your Developer option

Install just one android version, then you should be fine...
If you have a native android device, you don't need an emulator you can use the android device to debug. You can debug over USB or WLAN.
Or you could use android x86 on an other machine(Virtual Machine).

If you have a i5 and at least 4gigs of Ram, you should be really fine.
In case of disk space, it depends, I use only the newer SDKs and it takes only about 700mb disk space.
If you really need all SDK versions, sure it will be more, but I do not think you will need 20 GB even if you add some more versions.

Related

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.).

How to run an android app without stop

I recently built an android application that i need to run 24/24 7/7.
I thought about using web servers, so I bought KVM VPS WITH 2GB RAM AND 2 CPU CORES (Ubuntu). I tried to install Genymotion on it but it doesn't work, so I tried to use the androidx86 version on virtualbox and it works but it is very slow.
Now i am asking if there is a way to run an android application 24/24 on a server ?
In order to run an Android application on your computer and have it be fast, you'll need to use the x86_64 or x86 images. Using an ARM or MIPS based image requires overhead since native instructions can't be run on an x86 computer. Genymotion is good, but I find the new Android Emulator is really fast, and it's free.
I would check out the new Android Emulator and use an x86/x86_64 based image. You can customize your image to provide extra disk space and RAM allocation to the system image for better performance. I've had great luck getting it to run quickly and smoothly in recent builds.
Here is blog post and video from Google announcing the new and improved emulator at Android Dev Summit in December of 2015: http://android-developers.blogspot.com/2015/12/android-studio-20-preview-android.html
Note: Please make sure you have the most up to date Android SDK for best performance and to make sure you have the version they talk about in the link.

Android 4 ICS build source code - minimum system requirements

I have downloaded Android 4.0.1_r1 source. Upon decompressing the tar, the entire source code is around 9.21 GB in the disk.
The guideline in Google as quoted in http://source.android.com/source/initializing.html
Note: The source download is approximately 6GB in size. You will need 25GB free to complete a single build, and up to 90GB (or more) for a full set of builds.
Background Info
(my system) -
Intel i5 2 processors (4 core) , 8 GB RAM
My host system is Windows Server 2008 and I am trying to run Ubuntu 11.01 (64 bit) desktop with a memory 4GB allocated as Virtual Machine using Oracle Virtual Box. The disk space in the VM is currently around 50 GB.
These are my few small questions :-
What is the difference between single build and "full set" of builds ?
Based on the configuration shared , is it advised for me build Android 4 on a Ubuntu VM or should I consider installing Ubuntu on a separate primary partition with dual boot and start the build on a Ubuntu Host ?
Are there any known recommended minimum system configuration to support building Android 4 or above as I have seen somewhere in the external forums that one requires 16 gigs of RAM to build android. I dont expect an exact to the point answer on this but some minimum quick pointers would do fine for me based on someone's past build experience with Android 4 ICS.
Although it may appear as a duplicate question here , but the old question refers to previous versions of Android with much less source code.
By single build / full set I guess they mean all the variants you can build (engineering build, userdebug, user, etc).
RAM is a pretty serious issue when it comes to build time. Having said that, I've built ICS on a quad core (Intel Core 2 IIRC) with 4 GB RAM. It would take a couple of hours to build a single variant from scratch (with make -j4), and the computer would be pretty much unusable for other tasks in the meantime.
I think an eight core CPU and 16 GB RAM is about as low as I'd want to go on the specifications if I was going to build Android on a regular basis (I'm currently using an eight core Xeon with 20 GB RAM, which has pretty decent build times).
The disk space usage for the full repo with a single variant built is slightly more than 30 GB for me, but that will depend on exactly what you include in your build, so the 25 GB figure you mentioned doesn't sound unreasonable.
you will be very low on disk rapidely.
you're configuration is OK but it will be slow and you'll need lots of time to compile
Running it on a real ubuntu will give you much better perf
Ram issue is not a real one, if you're system is able to use lots of RAM it will compile faster because it will need less disk access, but doing it with 4 gB can do the thing. just more slowly
For the full set of build part I do not know
Good luck

It's 2012, are people still using Eclipse for Android? What about emulators?

I know the IDE question has been asked before, but I'm hoping there are new IDEs/options available to developers. Eclipse is too slow/unstable, even with my 8 GB of RAM.
Also, do we have any other options for emulators? The Android emulators, aside from being slow, I find is not a real world simulator of an Android device.
This is my first post on Stack Overflow, and hopefully by opening up older questions I haven't broken any of the rules.
I have 4GB on Windows 7 x64, AMD PhenomX2 and Eclipse it is not slow. I would suggest modifying eclipse.ini to give more RAM memory to eclipse :
-Xms512m
-Xmx768m
-XX:MaxPermSize=768m
You could also have a look at this blog post : Eclipse and memory settings.
As for the AVD, the emulators run better than before, but still if you want to simulate an 3.1+ Platform Device, you'll be in serious problems, since it is very slow. So as you said, it's 2012, you should probably test on some real devices.
There are other IDEs and emulator solutions out there.
For IDE Check : http://www.jetbrains.com/idea/
Other Emulation Option : http://www.android-x86.org/
By the way, I use eclipse and AVDs! :)
I'm hoping there are new IDEs/options available to developers
Nobody is forcing you to use an IDE. I wrote three books on Android application development using a plain ol' text editor and the command line. The only reason I use Eclipse now is because it's drag-and-drop GUI building support now makes it so compelling to developers that I feel I have to cover Eclipse more in my books.
Also, do we have any other options for emulators? The Android emulators, aside from being slow, I find is not a real world simulator of an Android device.
The closer you get to hardware, the more the emulator will behave like an emulator. Outside of that, it is as "real world" as you are going to get. For things where the emulator is insufficiently "real world" or is too slow (e.g., tablets, video playback), test using an Android device. All devices that legitimately have the Android Market on them are capable of serving as app development test devices.
Its true that eclipse is very slow and unstable but I still work on eclipse due to its Drag and drop design support. If you don't need that feature then go for IntelliJ IDE, It was the first IDE that I used for android development and is really better than eclipse in terms of stability, debugging and launching emulator.
As of the emulators, there are many new emulators available like Youwave, BlueStacks etc. but still you have to stick to android sdk emulator as it can be easily integrated with development and debugging.
Eclipse is probably the most used IDE by developers.
By providing Android plugins for Eclipse you don't have to ask developers to learn how to use a new environment (key bindings, windows, perspectives, buttons, ...).
I'm pretty happy to develop Android applications using the same IDE I use for other Java, C and C++ projects.
Regarding performances issues, I use it on Ubuntu and with 4GB ram and an i5 processor I don't find it slow or sluggish.
A 'vanilla' Eclipse install with Android Development Tools runs fine for me (I run it on an i5 with 4GB of ram and also on Core Duo2 with 8GB of ram).
You can also use a simple text editor for your Android projects if you want, or IntelliJ Idea community edition which is free and comes with Android support.
The problem with Eclipse (for me) is the number of plugins you've installed, if you just keep it down to the basics (java, c++) it works quite fast, some plugins are just CPU HOGS (FlashBuilder, STS ...)
I'm a happy user of Eclipse on Mac and have been developing for Android for years now. Prior to that I was doing JSP/JAVA in Eclipse using the built in support for Tomcat - awesome stuff.
It's priceless that one IDE can help you do WEB, Dynamic WEB (JSP/JAVA), Mobile development (Android) all with the same UI. No need to learn new stuff - how can you go wrong with that!!
Android Studio by Google. Is much better than Eclipse. It makes life easy and improves speed beyond your imaginations.

Categories

Resources