I have a problem - my app works fine on the simulator, but on the device it crashes. Is there a way to debug an app that is running on the phone?
Thanks a lot.
Yes, it's perfectly possible. Just use Eclipse and register your device for debug use.
The procedure is a little bit different with each device, but you will basically need to put your device USB connection in debug mode and run your program/project within Eclipse IDE.
Related
I have an android application which runs in a few different Android system. It works in all my mobile, tablet and one of my SmartTV system. But it only hangs in another different SmartTv system. My question is how I'm able to debug this issue? Currently I have no way to connect to this smart tv for debugging. Any suggestions will be appreciated. Thank you so much.
If you cannot debug it directly than I would try logging it expictly. E.g. add on every relevant point a http call where you log what happend.
I was working on Android Platform and I use my HTC Sensation for checking whatever I have developed directly on my phone via USB debugging instead of using that heavy emulator and everything was working perfect. But last week I rooted my phone and installed some custom ROM. After this problem arises that now when I connect my phone Eclipse does recognize it but when I run the developed app on eclipse it doesn't load on the phone.
USB debugging is enabled on phone.
Can you please tell me what is the problem ?
Here is the error I get in the LogCat but I dunno what it is:
I think it is all your ROM's mistake. A little bug in your ROM. I advise you to change to a new ROM. Most probably it will get rid of this error.
I have developed an Android app. That app is running on the emulator perfectly. My application gets data from webservices. when I run the applicaton on a real device, I am getting force close.
I do not understand what the reason is. I came to know that we can debug our application by running on real device. I don't know exactly how to do it.
I found some link for using a real device for debugging http://developer.android.com/tools/device.html. But in this link it is given that usbdrivers are required for connecting the device to a PC. I am using Samsung Galaxy y . I did not found any drivers for that model (GT-S5360). Can anybody please help me.
Except from device debugging you can also have a look at the device generated log. There are many applications that allows you to do do, CatLog being one.
You should have the Android SDK.
http://developer.android.com/sdk/index.html
Activate USB Debugging on your device and run adb logcat in a command line on the host.
http://www.groovypost.com/howto/mobile/how-to-enable-usb-debugging-android-phone/
If you use eclipse, you can do all this the same way as on the emulator.
http://developer.android.com/tools/building/building-eclipse.html
We have followed the way(android: debuggable= true in AndoirdManifest.xml and enabled usb debugging on phone) to run the android app on debug mode on the phone, but the phone is not being detected when the app is run as android application.
Here are the specifications of the phone:
http://www.gsmarena.com/samsung_galaxy_y_s5360-4117.php
What is the issue? What is really required?
try to install Samsung Kies tool.
in case you wont be able to fix it there's another solution. I also have the same problem as yours and the same phone as yours. My phone is not detected by eclipse. But my PC can detect the phone through usb drive and through Kies(sort of like itunes for android). The altenative solution to test your program on your phone is to locate the .apk file from your projects folder in eclipse. its in the \bin folder. then copy it into your sd card. Then on your phone, locate where you placed it and click, the phone would prompt if you want to install it. install it and it should work now.(delete if you want afterwards). IF you happen to solve the issue with our phone not being detected by eclipse, pls do email me: kobe.ed6#gmail.com . Thanks and i hope i was able to help,atleast. :D
Samsung Galaxy Y problem solved! What i did was, i plugged in the phone through USB before the first instance of eclipse on my PC. Then i hit "CTRL+F11" to run the hello world test program. And IT WORKED straight to my PHONE. I did nothing from the time i got the problem. Not even updates or anything becaus i didnt do any android development bec i was busy with something else. I just tried it just a moment ago, wishing that it work. AND IT DID WORK NOW! If the problem would still be there, try restarting your PC and plug your phone before the FIRST instance of eclipse. I dont know if the instance has to do with this problem but it is what i did and it worked! happy Android developing guys! =)
I installed Android emulator and it is very very slow that i am not able to test my web application in it. Is there any way to debug the application directly if I have a galaxy tab device with me ?
Thanks
If you hook it up using USB you can debug using a real device. Set the debugging flag to 'on'. See the manual: http://developer.android.com/guide/developing/device.html