Eclipse hangs when debugging android - android

I am running Eclipse Juno on Ubuntu 12.04 64bit with the ADT Plugin. I am working on an app for android and I can develop just fine, but whenever my app throws an uncaught exception while debugging, eclipse freezes and I have to force quit the program and restart again. This makes determining the bugs in my app near impossible because I can't even get the stack trace for the exception.
EDIT:
It seems to work sometimes, and I have noticed not discernible pattern as to when eclipse hangs.

I had exactly the same problem when trying to debug on a windows 8 workstation and the regular Android ADT bundle. I solved it by NOT using the standard ADT bundle. Instead I downloaded the latest eclipse (4.3.1/Kepler) and installed the SDK and eclipse plugin manually using the instructions from http://developer.android.com/sdk/index.html called "Setting up an Existing IDE".
So at least is my case the problem seemed to be Eclipse Juno version. When moving to Eclipse Kepler it worked.

Change the preferences of Android->LOgcat->Max number of logcat messages to buffer to '5000'. That should solve the problem.
[Update] You can also hit the [x] clear button on the logcat to clear all recent logcat messages.
Good luck!

Related

Android Studio can't debug if I use C code

Android Studio can't start the debugger if I use C code though JNI.
Running it normally works well, but the debugger doesn't even start, regardless if I'm debugging Kotlin or C code.
It throws a message Debugger process finished with exit code 127. Rerun 'app'
And the only detail it gave me is com.intellij.execution.ExecutionFinishedException: Execution finished.
Here I set up a simple github repository to replicate the error: https://github.com/perojas3/Android-JNI-debug-bug-example. It simply calls C code to get a string and then displays it in a toast.
And here I set up an small youtube video displaying the bug the way it is happening: https://youtu.be/8jIL5yqP7m8
I'm using Manjaro Linux right now.
I had the same issue and installing libncurses5 package solved it.
If using Ubuntu: sudo apt install libncurses5 and launch the debugger again (no android studio restart required).
I also had this issue.
I was able to run and debug my code normally, but for some reason I started to get this crash while running on debugging mode:
Debugger process finished with exit code 127
After playing a lot with Android Studio's settings and Edit Configurations, clearing caches, restarting both Android Studio and the computer and many other things, nothing was helpful.
I struggled with it a lot and the fact that there're no discussions anywhere about it annoyed me a lot, so having no information online together with the previous feeling about it happening after upgrading to Android Studio 4.2, made me think maybe it's a new issue raised in Android Studio's new 4.2 version.
So, I decided to download Android Studio 4.1.3 and give it a try. It worked like a magic and I can finally debug my code :)

Android Eclipse ADT build build process enters an unending loop

I have downloaded latest adt bundle for mac from android developers website. I do create a library project connected to main project and suddenly, Eclipse started to nag! I checked the build progress and I figured out that build process restarts at 40-50%.
I have captured a screenshot:
Some people suggested to disable Build Automatically. After doing this, the project builds and runs OK but I have to build manually after every little change and it's boring.
I am using Eclipse IDE for android Developers version 23.0.2.1259578.
Android SDK Manager details:
What is the cause of this misbehavior? What is a good solution? Any idea?
This was my solution for this issue I have posted a few month ago,
https://stackoverflow.com/a/24631434/2970351
Also try other solution in that page if it didn't work for you.

Linux version of Eclipse - logcat not showing Android project logs

I have read many of the posts for logcat not displaying in Eclipse and so far nothing has solved my problem. I have two installs. Logcat in Eclipse installed on my windows laptop works, but on my Linux Mint laptop those same programs will not display in logcat and not just with my log command in the program, but nothing shows - not even a trace.
The command line options of using adb logcat shows the logs just fine. It just won't show in the logcat window in Eclipse.
I have made sure the emulator is selected on the device tab, I have reset adb, I have restarted eclipse,Under I made sure "Monitor logcat for messages from applications in workspace" was checked and selected "VERBOSE".
I don't have any filters set.
Any ideas on what to try next?
I have had other problems with this linux installation that I had to fix. For instance, the default Google Eclipse/Plugin Bundle had some bugs. Some of which were solved with a new version of Eclipse and some were solved with a new version of ADT.The version of ADT also had a bug that would not let you upgrade it through Eclipse. So, I removed that bundle install and re-installed everything manually:Eclipse 4.4, then installed the 4.4 plugin and the various build tools and API levels and extras I needed. That solved some of those bugs.
That left the logcat issue and one major bug. Eclipse would freeze-up when the android auto-complete pop-up would display. On a hunch, I decided to run Android-Studio to see if it had any freeze-ups. When I started Studio, it warned me that I was using OpenJDK and it has known GUI performance problems and hangs. It gave a message that it recommended that I install the offical Oracle JDK, which I then did. That solved freeze-ups and hangs on Eclipse with the Android auto complete popups.
Now just this one problem left to solve - on my Linux environment, making logcat within Eclipse wok. Any suggestions are appreciated.

Exporting APK from eclipse (ADT) silently crashes

Every time I try to export an APK from Eclipse (tried Juno and Indigo) on Mac, eclipse crashes after a few seconds
This used to work fine on my current setup.
Running the app straight (debug mode) on my phone works fine.
The error from the console is:
Invalid memory access of location 0x10073f113 rip=0x101f656f7
Bus error: 10
I'm using Mac OS X 10.7.4 on a ~2010 MacBook Pro, with the following java:
java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-11M3720)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)
I'm using ADT 20.
I've tried reinstalling Eclipse and the Android SDK, and re-downloading ADT.
The Eclipse error view doesn't show anything
Any ideas of different methods I can try, or other ways to investigate what's going wrong?
Cheers
Update: For anyone coming along post-2014, you should be using Android Studio, which doesn't have this problem.
Disable Project/Build Automatically when you are exporting
I think is a problem of Eclipse unable to detect the Android command is still working or something similar.
Of course there is ever the option of APK generation using Ant outside Eclipse you can generate an Ant build.xml from your Eclipse project more info in official Android docs
Disable Project->Build Automatically. I've noted that this works for me.
Disable project/build Automatically before export the apk.
This seem to be problem with your JVM. Can you update your java and check again. Also check this link
project/ clean worked for me. I think it could be related to the building of the project, as other users have posted.
The problem has gone until I have update ADT and Eclipse. I don't know which one solve the issue.
Now it's working smoothly for severeal signed export, with:
ADT Version: 22.2.1.v201309180102-833290
Eclipse Juno Service Release 2 Build id: 20130225-0426
Gentoo Linux running Java 1.7.0_45-b18.
UPDATE: Few exports after, I still get crashes from time to time, but no very frequently.
may be you should try to add execute authority . you can try something like this
first close auto-build
cd /home/your name/android-dev/sdk/tools/
sudo chmod +x zipalign
done and good luck to you
I used the disable Build Automatically for months now, until I realized that AWS plugins were slowing down the entire launch process. I uninstalled all AWS plugins from Help->InstallationDetails and everything now works perfectly as before. I do not need to disable Build Automatically any more.

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

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.

Categories

Resources