Android :: Debugging In Eclipse / Current Line Wrong For Methods With Multiple Return Points
Apr 2, 2009
While doing debugging with Eclipse I noted that the debugger highlights the wrong line as "next line to execute" for methods with multiple return points. It fools the developer that the last line of the method is executed, where in fact it is not.Does anyone know if this is some kind of known issue? My colleagues have also experienced this but we have never seen it when doing on- device-debugging on e.g. the Sony Ericsson SDK.I couldn't find anything at http://code.google.com/p/android/issues/list There was a similar post in android-beginners 2007-11-25. No replies, though. http://groups.google.com/group/android-beginners/browse_thread/thread.
View 2 Replies
Mar 31, 2010
I've obviously been spoiled by Visual Studio, because although I'm just learning Android and the Eclipse environment, debugging apps in Eclipse is becoming a serious detriment to further development.And then, when it executes it under the debugger, I will get a full screen of useless debug info, non of which actually points me to the specific line containing the error.The stackTrace is null within the exception ('e') info tree, and it simply states a message stating 'ArithmeticException'. (that's nice, how about you point me in the direction of where you found it!?)I've looked all over the screen and am baffled that this IDE can't get this right. Does developing with Eclipse resort everyone back to 1991 with printf() like logging at every interval then to track down bugs? Seriously.Is there a configuration or plug-in that I'm missing to help with this?I haven't tested this case with XCode, but if the iPhone dev. IDE handles this more like Visual Studio, then no wonder the Android marketplace has so few apps.
View 4 Replies
View Related
Sep 1, 2010
1. what is the getKeyDownTime() method? What does its return value mean logically? 2. what is the getKeyEventTime() method? What does its return value mean logiccaly? 3. I want to measure the time a key was depressed for. Eg: Key A was pressed for 60 ms. which of the above methods would be useful?
View 7 Replies
View Related
Apr 20, 2010
I'm currently developing a simple 2D game for Android. I have a stationary object that's situated in the center of the screen and I'm trying to get that object to rotate and point to the area on the screen that the user touches. I have the constant coordinates that represent the center of the screen and I can get the coordinates of the point that the user taps on. I'm using the formula outlined in this forum: How to get angle between two points?
-It says as follows "If you want the the angle between the line defined by these two points and the horizontal axis:
double angle = atan2(y2 - y1, x2 - x1) * 180 / PI;".
-I implemented this, but I think the fact the I'm working in screen coordinates is causing a miscalculation, since the Y-coordinate is reversed. I'm not sure if this is the right way to go about it, any other thoughts or suggestions are appreciated.
View 2 Replies
View Related
Oct 23, 2010
When I send latitude/longitude points to the Emulator (using DDMS with GPX file or using "geo fix" from command line) the locations received by Apps on the Emulator are slightly off. So like I send a latitude of 41.74 and onLocationChanged recevies a Location, and I to toString() on it and get a longitude of : 41.74016776666667 Tested with my own app and then with Google Maps on the Emulator to double check. So its not an app issue.
View 14 Replies
View Related
Nov 11, 2010
I'm configuring emacs to debug android apps. My problem is since I'm attaching jdb to DDMS I cannot set proper classpath (jdb just won't start when I try to set -classpath and -attach together). So jdb is practically blind - no entry point for class, no interactive debugging. How can I specify classpath when attaching debugger to ddms?
View 1 Replies
View Related
Mar 15, 2010
The Eclipse build for my 1.6 application project is succeeding and the Ant build is failing. I'm looking for help on why they aren't behaving the same way.
We are developing on Mac OSX 10.5.8 with Eclipse 3.5 against SDK 1.6 + Google APIs. There are no setting changes in Eclipse, either at workspace or project level. Similarly, our ant is also a vanilla- flavored unmodified installation of 1.7.1. JDK is 1.5.0_22. The CLASSPATH environment variable is not set. JAVA_HOME is /Library/Java/ Home
The application was initially created by a team member using the Eclipse plugins. The application references two jar files, one of which has a dependency on javax.xml.bind.annotation.XmlSeeAlso, which is not defined anywhere in our code or in android.jar. The other jar file has an explicit dependency on android.jar. I generated the Ant build file using android update.
The Eclipse project builds an apk and runs the application in the emulator. I think this is incorrect behavior.
The Android project fails to build. I think this is correct behavior. MyClass.java:98: cannot access javax.xml.bind.annotation.XmlSeeAlso[javac] file javax/xml/bind/annotation/XmlSeeAlso.class not found
Any ideas as to why the two build methods are behaving differently? I would expect them both to fail.
View 5 Replies
View Related
Feb 22, 2010
I am developing using Eclipse and MyTouch phone, while i can run the application fine on the
device, i can't seem to set break points for debugging. is there some settings/tools i am missing?
View 4 Replies
View Related
Jul 3, 2009
I need advice/pointers on how to display on a map multiple points that change somewhat infrequently based on the device's location. Currently, my application already displays in real-time the device's changing location on a map. I can also easily display the location of one of the other points of interest. However, I have not figured out a way to have both displayed on a map at the same time.
View 7 Replies
View Related
Nov 24, 2009
Why should the debugger don't make breakpoints stop when running an android app on Eclipse ?
View 4 Replies
View Related
Oct 16, 2010
I've turned on USB debugging.I have the latest HTC Sync and android SDK components.I'm using Eclipse 3.5 on windows XP. I'm running Android 2.2, and am asking for 2.1 as the minimum in the debugger.I work in Eclipse/Java just about every day, and have for several years.I'm even writing an Eclipse plugin at work as I type this neither Eclipse nor Java are new to me by quite a stretch.When I start a debug session for the "Skeleton App" sample project, I can see my Evo, and the activity launches (with any freshly saved changes), should I select it.I have tried different android connection types (charge only, disk drive, HTC Sync, and USB tethering) to no avail. I've tried Eclipse 3.6 for a bit before yielding to the inevitable and reinstalling 3.5. I monkeyed with the emulator for a while but ran into a different set of issues (I had to reboot the emulator every time I wanted to make a change... Eclipse's auto-build/hot-swap has me spoiled).Is there something I can add to (or remove from) the AndroidManifest.XML to deal with this? A magical incantation perhaps? Must I pray towards San Jose three times a day on a rug woven from kernel gurus' vast and scruffy beards? Is my Evo not Kosher? Must I be "sky clad" while debugging? Shall I teach my laptop to genuflect?
View 3 Replies
View Related
Nov 29, 2009
When I run my app on my phone from eclipse, it always runs in debug. This has only recently started to happen. I guess I must have inadvertently changed a preference or something, but can't work out what. Does anyone know how I can switch it back so I can run without debugging?
View 2 Replies
View Related
Aug 30, 2010
I'm building an android app and I'm currently having trouble retrieving a bitmap from an URL.
Here is the code I'm using :
CODE:..........
Everything works fine when the picture's write but when some bytes are wrong, result gets null. I think it's basically expectable as it's written this in the doc of BitmapFactory.decodeStream :
If the input stream is null, or cannot be used to decode a bitmap, the function returns null. The stream's position will be where ever it was after the encoded data was read.
The problem is, my wrong picture is well interpreted by my web browser and I can do so on iPhone platform.
Is there a way to sort of ignore those wrong pixels? maybe with the option parameter?
View 1 Replies
View Related
Jan 1, 2010
This is really frustrating, I am trying to get a carriage return drawn in my custom view and nothing is working. I have tried 'System.getProperty("line.separator")' but that makes it say null and I have tried '
' and '
' and those just both draw a little square. I am using the canvas.drawText meathod.
View 2 Replies
View Related
Apr 20, 2010
I've read the lame documentation, and checked other answers.I'd like my Android app to print some debug statements in the logcat window of Eclispe. If I use the isLoggable method on the various types of debug levels on the Log class, I find that WARN and INFO are returning true and Log.i do not produce any output.Does anyone know which gotchas I've missed?And just to vent, why should this be hard? I've published apps for iphone and bberry and while appreciate the use of java, the platform is reeking of too many "genuiuses" being involved. I suppose Activities and Intents are very flexible, but why? I just want to put up some screens, take some input and show some results. The bberry pushscreen and popscreen is a lot less pretentious.
View 2 Replies
View Related
Aug 2, 2010
I am just starting to learn Android development using the Android SDK and Eclipse. I can get my HelloWorld starting app to run in the device emulator, but not on my Verizon Droid handset. I have downloaded the drivers for Windows 7 and I can see the files on the handset in Windows Explorer, so I'm assuming I have the drivers working. I have enabled the USB Debugging on the handset.The problem is that when I set the Debug mode to Manual in Eclipse, I do not see my device in the "Choose device" list.What am I missing?
View 2 Replies
View Related
May 15, 2009
I am trying to debug android source code with ecliplse. And I can see that eclipse has connect to emulator via ddms. And I can see the log coming out from eclipse, but when I select an process in DDMS, and trying to debug the process, process can't stop on the breakpoint I have set.I think there might be some thing incorrect somewhere. Can anybody give some advice?
View 4 Replies
View Related
Dec 15, 2009
I've many times debugged my Java EE code running on Tomcat and JBoss quite effectivley with Eclipse, but I'm running into a brick wall debugging an Android app on the Droid. I think I have to debug on the device and not the AVM because the app interacts with MapView, GPS, etc. Maybe I need to use the AVM to effectively debug?What happens is I get NullPointerException or ArrayOutOfBoundsException in the main thread at something like ViewRoot.draw(boolean) line: 1373. Of course, by default, the source won't be found. So I downloaded the source with Git and pointed Eclipse at it. However, I think I don't have the right source, because the line is that the exception appears to have been thrown from is not completely relevant. How can I be sure I'm using the correct source code for debugging the Droid? After writing this, I've found that although Eclipse is not displaying the little green dot when I set a breakpoint in the Andorid code, it does show up in the breakpoint view and I can step through the code. Not sure if this helps me. Is it perhaps my ignorance of Dalvik and/or debugging threaded code?
View 4 Replies
View Related
Nov 3, 2010
Does anyone else have a problem of wrong line numbers in the crash report traceback. They seem to be off about 2-3 lines. Sometimes it's difficult to figure out what exactly caused an exception.
View 4 Replies
View Related
May 24, 2010
I have some piece of code which uses JNI. I can debug code wrote in Java directly in Eclipse (using ADT). I even have a script, which help me debug native code with gdb. However this is not very comfortable way for doing this.Is it possible to configure Eclipse to use gdb (I guess gdbserver) for debbuging android native applications? Do you know where I could find any description of this?
View 1 Replies
View Related
Sep 15, 2010
how can i debug the android telephony and radio service part of android (system_server) using eclipse debugging tool.
View 3 Replies
View Related
Jan 18, 2010
How can I debug some system process (...acore), for example, the status bar, in Eclipse ? I couldn't find any help online yet. I'm able to debug a normal application, but not system threads (windowManagerSevice etc).Also, when I open the Android source in Eclipse using the official instructions, I get build errors, is it OK ? (already executed "make" successfully)
View 2 Replies
View Related
Apr 12, 2010
I've installed the Android SDK and the ADT plugin, but Android doesn't show up in the Window>Preferences dialog.I'm running Galileo. If I go to the Installation Details part of the About Eclipse dialog, it says that I have 0.9.6 of Android DDMS and Android Development Tools. I can run adb from the command line. I tried going around the uninstall/reinstall loop once.I'm on Windows Vista. I also have 2.7.7 of the Scala plugin installed, but I tried uninstalling that.
View 3 Replies
View Related
Jul 7, 2010
I have a Android phone connected with host computer with USB cable. ADB runs well and I can debug application on phone. The only problem is that the App requires special network setup which I can reach on host but not mobile. Is there a way to let the device send all network operations through ADB and Host network?
View 1 Replies
View Related
Jun 17, 2010
the Java sources for the Android framework are available at source.android.com. Can I download and feed them to Eclipse so that I can step into framework methods while debugging? Better yet, does anyone know of an Eclipse plug-in that would get them from Android Git automatically as needed?during debugging, I can step through the framework code; I can see local variables by their declared names, and line numbers as well. It seems like the debug info is already there - only the source file is missing. While I can open it in parallel and watch the execution unfold, the question of version matching remains. Of many versions of the class file in Git, how do I pick one that matches whatever is running on the device (or emulator)? This is more of a Git navigation question - how do I pick up the very version of the file that went into Android release, say, 2.2?
View 1 Replies
View Related
Jul 25, 2010
I am a newbie to Android and the Eclipse development environment and would like some advice on best practices for debugging my apps when they throw a Force Close.I have researched ADB, however, I can not get this to interact with my phone even though I have explicitly turned debug mode to true on my test handset.Obviously Android comes with a LOG method which I have seen utilized in many example apps, can someone please explain how to review these logs quickly and how to setup logging appropriately to determine the cause of a Force Close (always occurs when I push the Home button).Any advice on debugging effectively in Eclipse would be much appreciated!
View 2 Replies
View Related
Oct 1, 2010
I have a simple Android Service, which should start on device bootup. However, I cannot debug this using Eclipse on Windows.
The error I get from Logcat is
CODE:................
My manifest looks like
CODE:............
I have a breakpoint in my ServiceAutoStarter code (below), which is never hit.
CODE:......................
View 2 Replies
View Related
Aug 8, 2010
I am developing a simple android application using eclipse.I wrote a JUnit TestCase for a class I wrote.One particular test compares two 2d arrays so see if they are equal. If they are not equal the test fails.When the test fails I would like to print out the contents of the offending array to see what went wrong. I have tried System.out.print and it doesn't show up in the console or JUnit results.What am I doing wrong?Is it even possible?
View 1 Replies
View Related
Aug 15, 2010
I am developing on Windows machine.I was working quite well until yesterday, when I saw the the update prompt and updated my ADT plugin. Today when I tried debugging my test project, I experienced either one the following cases:
1) Logcat stops forever on the message "sending wait chunk".
2) Logcat shows the following message, and test project fails:
3) Eclipse stops responding.
The above cases happens even when the test unit contains nothing.Also it just doesn't not work in debug. The test case runs successfully if it is not in debug mode (But there are still some glitches, like Logcat sometimes won't emit debug messages).
View 2 Replies
View Related
Nov 7, 2009
Just got my hands on a Droid and now I'm working out some kinks. My iPhone and laptop have no problem roaming aggressively between multiple access points we have at work that share the same SSID. I can't seem to get the Droid to do the same thing. I've tried downloading some wifi scanners, but they don't quite cut it. Is there a setting I'm missing? The expected behavior would be for the Droid to happily associate with any AP that shares a "remembered" SSID. Right now, it requires manually going into settings and associating with each and every AP in order for it to hop automatically as I move around the building.
View 4 Replies
View Related