Why does Eclipse + ADT plugin keep the CPU at 100% - android

The second I open up layout.xml file from a simple skeleton app in Eclipse example plugin, the cpu usage locks up to 25% IE. 1 full core. and it's been on like this for the last 30minutes I wanted to let him run a longer time because I thought it is working something in the background but it just keeps doing that.
I've tested this on 2computers so far and the setup is
install Android SDK,
install Eclipse IDE for Java Developers,
install ADT plugin: http://dl-ssl.google.com/android/eclipse/
open new project, select a skeleton project for Android 2.3.3
and just open the layout skeleton activity and perhaps change to android 2.3.3 in the upper right corner and maybe setup to theme.black.noTitleBar.Fullscreen.
And now your processor should be hitting 100% ( on one core ) and should be locked like that from now on.
Is there any solution to this issue, because at home I only have 1 core and I can not work on anything.
Does any one have any clue as to why this is happening ?
http://my.jetscreenshot.com/demo/20110517-gbr8-201kb

I'm seeing the same issue so I filed a bug report at http://code.google.com/p/android/issues/detail?id=18865.
The Android team have now released a fix and it works for me. You have to upgrade to the latest revision of each SDK module that you downloaded through the android tool. The latest version of the ADT also has a number of fixed for long-standing issues.

I can't answer "Why" this happens. But I can say what fixes it.
I encountered this on Ubuntu 12.04 64 bit. I had 100% cpu and eclipse hang when I switched to debug view - Eclipse was unusable and had to kill it. I found the below bug report
https://code.google.com/p/android/issues/detail?id=34641
Following the comments there, I tried
cd /usr/lib/x86_64-linux-gnu/gtk-2.0/modules
mv libgail.so libgail.so.moved
Eclipse did not hang (no 100% cpu) when I switched to debug view.

Start Eclipse with -Dcom.sun.management.jmxremote (put it into eclipse.ini or start eclipse.exe with this option).
When Eclipse runs, start jconsole and look at the thread dump to see which thread hogs the CPU. It's the one which isn't WAITING. File a bug report.

I had the same problem and it was resolved just by moving my workspace to C:/workspace instead of Win 7 Libraries.

Related

Experiencing unusable display issue with Android Studio on Ubuntu 18.04

Background
I'm trying to use Android Studio 3.3 Canary 8 (the latest Preview release). I'm running Ubuntu 18.04 LTS 64-bit, and if it's relevant, my desktop environment is KDE Plasma and my window manager is KWin.
Issue
It was working completely fine until a couple of days ago, when I began experiencing an unusual display bug which rendered the editor completely unusable for me.
Here are a couple of screenshots of what Studio looks like right now. The first one is the Tip of the Day window that pops up at startup, and the second one is the actual editor itself.
From what I can tell, it seems that all UI elements have been stretched vertically, or something along those lines.
Troubleshooting
I tried Googling around for my issue, but I'm not entirely sure what to even Google in the first place. I tried some variations of "Android Studio display bug" or "Android Studio UI vertically stretched", things along those lines, but most search results apply to Android applications and not the editor itself.
I suspect that there's an issue with Android Studio's DPI detection, but I have no way of fixing any issues there given the fact that I can't see any text anywhere.
Attempted Fixes
I tried redownloading Android Studio from their website and running that fresh install. No dice.
I tried completely removing any Android Studio configuration or cache folders and reinstalling. Nope.
I tried using the release candidate instead of the Canary build. That didn't work so I tried using the stable release (3.1.4), which didn't work either.
I tried rebooting my computer too, but the issue persists.
I can't think of anything on my computer that might have changed between the last time Android Studio worked fine and now. I do remember installing some system updates, but I'm not sure which ones specifically (if there's a way to find out what updates were installed for a given run of sudo apt upgrade, I can include that information in this post).
Bottom Line
I'm really at a loss, and this is a really frustrating issue. Any help would be greatly appreciated, and if this is the wrong place to ask I apologize. If there's any more information you might need to troubleshoot this, please let me know and I'll update this question.

Android Studio gradle build stuck at app:processDebugResources

I'm on Windows. I created a new project on Android Studio for Marshmallow at least.
The only thing I've done so far is generating the main activity which is a tabbed activity with view pager. Also, you should know that this project is a private git repo that I cloned.
I'm working on this project with another developer and the project is perfectly working on his side.
The problem is:
When I try to launch the app (wether it is a virtual device or my real phone), the gradle build gets stuck at the app:processDebugResources step. I waited more than an hour and nothing happened. Moreover, when I want to cancel the gradle build, it doesn't respond and I have to kill Android Studio process. Then I restart Android Studio and I have to kill a gradle process that prevents the initial gradle build (at Android Studio startup) from working.
The crazy thing is that I was able to launch the app before. I even installed it on my phone!
What I've tried so far:
Do what stackoverflow was giving as solutions like tick the offline mode in the settings
Create a new project --> It doesn't change anything
Reinstall Android Studio --> It doesn't change anything
Deactivating Avast antivirus
Invalidate cache/restart + Clean + rebuild (the rebuild gets stuck like when I try to launch the app)
And maybe other solutions that I forgot...
It's getting very annoying as it's making me lose days of development.
If you have any more solutions, or if you think I should try again some of the previous solutions, help would be greatly appreciated !
I know this is an old post, but I faced the same problem during the last few days and since i got crazy I hope I can help someone else out there.
After many hours of troubleshooting I found that the Java Platform SE binary executable goes in "suspended mode" in Windows 10, preventing Android Studio from compiling (it hangs at app:processDebugResources).
Example Screenshot
Killing the suspended process and recompiling the project works just fine... until Java gets suspended again.
Maybe your gradle version is not compatible with it. Try again with latest version of gradle in your project.
I did several things:
Install NDK
Change JDK from embedded one to Jdk 8
Redownload SDK i was using (6,7,8)
And now the problem is solved ! I have no idea which of these things made the tricks but I'm happy ! It may be useful to someone else one day.

Android Studio 2.3.1 | Gradle "AppName" project refresh failed

For 2 days I can't start coding my first android app, because of an issue with Android Studio 2.3.1.
There is many discussions about that out there, but non of them helped me so far.
I'm not able to use Run button for my app or even to edit the main_activity.xml file in the program window. Also the following error occurs when Android Studio starts running.
Screen shot of the error:
I'm workin' on Windows 7, 64bit, 8gb RAM, Java 1.8.0.121. Installed Android Studio 2.3.1 using android-studio-bundle-162.3871768-windows.exe file with no custom settings.
To solve the problem I've tried:
reinstall Android Studio
remove .gradle catalog
use File>>Invalidate Crashes/Restart
nothing helps.
Problem solved!
In my particular case the problem was caused by uncomplete Android Studio installation.
The reason of such an installation was Comodo AntiVirus
I noticed that there was some .bat files blocked during the installation. Comodo doesn't inform about it, but you can check it on blocked features list.
So I removed completely Android Studio, turned off all blocking functions in Comodo and quited it. Then installed AS once again.
Now it works fine. Ad least so far... Luckilly there's no Gradle error, so I hope there won't occur further problems.
Hope that this tip's gonna be helpful to somebody.
Have a good day folks!

Android Studio not executing, it only shows splash screen

Android Studio not executes the IDE, it only shows the splash screen, after few seconds, it dissapears.
I tried the following solutions:
I uninstalled the program and installed again
I restarted my PC after installation
I added "JAVA_HOME" and "JDK_HOME" as environment variables
I checked if "studio.exe" process is executing, if IDE is executing in background.
I executed Android Studio as "Administrator"
I disabled Antivirus temporarily
I deleted ".android", ".AndroidStudio", ".gradle", ... folders
These solutions not worked.
Which is the problem with execution?
If you have done this:
do you have installed the JAVA SDK donwload the latest release from here!
be sure to have configured the JAVA_HOME and JDK_HOME in your environmet variables.
then check the .log file generated by Android Studio to get more information about your issue:
C:\Users[MyUser].AndroidStudio1.2\system\log\idea.log
I recently experienced this issue as well.
It was related to me having dual monitors and oddly the secondary screen was not able to load android studio.
In my setup the issue resolved itself once the secondary screen was made the primary screen ( I have an ATI graphic card 8300) with Android Studio 2.3 and Canary build 3.x
This is typicaly a low memory problem. I currently have the same and I was able to make few correlations. If you start your task manager, you will notice that "Disk" goes to ceiling when starting Android Studio. Actually, you will surely notice that it goes more often to 100% that you'd expect and Android Studio is just the perfect vector to observe this, since it consumes a lot of resources.
The annoying part of the answer is that this "Disk 100%" bug on windows 8.1 is really widespread and solutions doesn't seem that straightforward. For the record, if I find my cause (or if I'm all wrong in my hypothesis), I'll keep you posted.
Regards

Painfully slow make with IDEA 12.0

I love the new incremental Java compile in IDEA 12.0 but there seems to be a price to pay. Making now takes about twice as long as in 11.x, most of the time appearing to be spent
Executing DEX
(according to the status bar).
I can take a 12.0 project, revert to 11.x and making is back to "normal speed" (approx 4 minutes vs 30 seconds).
I don't get this. AFAIK, IDEA (or Eclipse or any other IDE) is just shelling out to dx.jar to compile the Dalvik executable. If there was a problem with the ADT, it would affect 11.x equally.
OS is Win 7 Ultimate. 3.2GHz quad core with 16GB but I suspect that the issue is not related to OS or PC since 11.x is OK.
Any ideas? I'll log a bug with Jetbrains but wanted to see if anyone has more concrete info or workarounds? There's nothing so far on the Jetbrains bug tracker or fora that I can find.
I have had this issue a couple of times in the past and it's always been due to the inclusion of a global library that hangs during build.
On one occasion it was due to the Python libraries trying to execute when the Android project was built because I had a python file in my Android project and IntelliJ decided to add the Python runtime libs to my project dependencies.
More recently the same thing happened with Groovy when I had a gradle file in the Android project.
For me I simply removed these dependencies from the project and the problem resolved itself.
In my case I discovered this by force killing (kill -9) the java process that was running the make. This caused intellij to dump the error to the Messages view in the IDE where I could see groovy trying to execute.

Categories

Resources