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
Related
This question has been asked before but I cannot seem to find either YES or NO.
I am fairly a noob when it comes to app development and I can only work with Pascal, and Delphi 2010 is the only IDE my laptop can run without trouble. I have a Compaq CQ58 notebook pc, wth a Intel(R) celeron(R) 1000M # 1.8 GHz processor 64 bit os and 2 GB RAM.
It is a very low grade laptop, but is it still possible to develop android apps with it? I have Kotlin's IntelliJ IDEA Educational Edition 2021.2.1 insalled but it takes up too much RAM with the Gradle plugin running.
To sum it all up, can an Android app be developed Without an IDE and if so, HOW?
Without an IDE? Yes. You can use command line gradle commands to compile, and any text editor to write the files- vi or notepad would work. With that low a grade laptop? Gradle is memory hungry. I wouldn't want to compile a non-trivial app on less than 16 GB, and I prefer 32 or 64. The speed of your processor is actually less important than being able to hold enough data in memory for gradle to run.
I don't know where you are in the world, but you can get a cheap PC for only a few hundred dollars. If you can possibly afford it, its well worth the investment. Even if you could build on your laptop, builds would take hours as things paged. 2GB has been the minimum settings for most OS for a decade, and it didn't run well in that. You can get a 16 GB machine, which I would consider the minimum, for $500 or less. You don't need a good video card or the fastest processor, but you do need sufficient ram.
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.).
I have switched to ubuntu 14.04 from windows7 and now my android studio is hanging too much and my system configuration is as follow :
Ram : 6 GB
Processor : Dual core
Main problem is while debugging the application and for that i am using device not an emulator and i have also seen that my sdk size is 60 GB on ubuntu but on window it was about 15-18 Gb and I don't understand why it is taking this much space?
So if someone has idea why this problem is coming,
Please Help me with it.
Thanks in advance
The hanging problem can be a result of lot of different things:
-It might be because your Android Studio is using too much of RAM.
You can check this by following command:
$top -o %MEM
this would result in such an output:
the output of top command
the "Java" there in the first line, in the linked image is the Android Studio and in my case its using 47.5% of RAM.
As I have low RAM, the OS starts using SWAP memory which would make the application respond slower. Usage of swap memory can checked by using command
$vmstat 1
So, there is no way you can bring that down. You can only close other applications so as to provide the required RAM.
I have 2Gigs of RAM and therefore I login into OpenBox and then start Android Studio, this works for me quite well
While the size of SDK must not be a problem.
The size of SDK depends upon the tools and the API related SDKs that you have downloaded.
You can open up your SDK manager and delete some packages if you want but that wont make Android Studio run faster.
-The other reason can be the iBus-daemon and that is a known issue. The workarounds can be found here
http://tools.android.com/knownissues/ibus
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.
My experience with the Android emulator is that it is so slow that it is unusable. I see threads related to the issue going back over a year. The lack of a coherent response to the question is unacceptable (this is not the Community's fault).
Question: Has anyone that has experienced extreme slowness (more than 15 minutes to launch) actually resolved this issue so that startup is less than a couple of minutes? If so, what did you do?
Please note that I am not trying to tie the emulator to Eclipse. I am teaching mobile web app development using jQTouch. The web apps are testing by running the emulator standalone and opening the Browser.
While my machine is a little dated, I have no trouble running Vista, Office, PowerStudio, etc. Here are details to add to the data around this issue.
OS: Microsoft Vista, 32-bit
Processor: Intel Celeron M CPU 520 # 1.60 GHz
Memory: 1.5 GB
Symantec Antivirus - Disabled
Emulator Start with no animation - did not help
Startup time in excess of 20 minutes
Java Version: 1.6.0_21
AVD Settings: Device RAM size 1024, Snapshot support enabled both in AVD and startup. - ram size and snapshot did not help
Google needs to acknowledge the issue and provide guidance about what development environments actually work. If there were a recommendation for platform, java version, memory, etc., I would follow it.
Right now I have no options other than to tell students that the Android emulator doesn't work. The only android solution is to buy a real phone, which limits testing to a single Android version and configuration.
Students are not having trouble with the iOS simulator running on the Mac.
If someone that works for Google could actually comment, that would be great.
Thanks,
Dale
The Android emulator is just that, an emulator -- it is emulating an ARM processor. Emulation will never be as fast as native. Given you are using such a large amount of your computer's memory for the emulator, you are likely having to page consistently, which will add to making the performace suffer.
The iOS simulator on the other hand is just a set of APIs that matches the iOS SDK and pretends to be an iOS device, but is running all code natively on the machine with all the resources, processor speed and memory the machine has, and likely to run significantly faster than running on the actual device.
I have no problem running the Android emulator on my old Core Duo T2400 # 1.83GHz with 2GB of RAM. The startup time can be a few minutes, but once it is running it works well with only occasional lag.
My desktop with a Core 2 Quad Q6700 # 2.66GHz with 2GB RAM tears through the emulator.
Both machines have run the emulator under Windows and Linux with varying Java versions getting similar results. My guess is that your processor is a little on the weak side.
check this article How to speed up the android emulator by up to 400
Or in brief, download an android-x86 build here, install with virtualbox, find ip address of android vm by alt+F1 and netcfg (alt+F7 to go back to graphical mode), and connect to the vm using adb (say adb connect 192.168.1.5).
Just used it, much more faster.
I've found the emulator to be very slow too - I think it's best to have a working android device and just have the emulator for a backup 'second opinion' or a reference device. It's usable but much slower than my phone, even though my current device is quite low end.
Eventually, I found that sending my code to the physical device (or emulator) was becoming a bottleneck so I build a small framework to allow me to develop most of the work as a desktop application. This has worked very well so far and has sped up my development turn around considerably. Your milage may vary.
Try using Genymotion emulator for android which is fast and also support all major platforms including Linux/Mac and windows. It also has specific emulator image files to emulate actual mobile devices like Xeperia Z or Nexus 4 and so forth.
Use Genymotion. It s is a very fast android emulator.
Android emulator is just a emulator, it emulates an Android device. It's like virtualization, you share your computer's resources with emulator, you'll need to have the latest processor and at least 8GB or RAM to run faster. About RAM: Windows and background programs consumes a part of your resources, if you upgrade your computer resources, the consumption of these software will be almost insignificant and you'll have a lot of resources for your emulator (supposing you also have Eclipse or Android Studio running).