I made example project, it's not big, but I think too big to post it here - so I uploaded it here
http://www.filedropper.com/logtest
Run from Eclipse on avd it works ok on device with Android version 4.2.2
My phone has Android version 4.0.4 and all I am getting is
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
What should I change/enable/set to get logs on my phone too. I want to let the app on a phone for "real life" testing and send logs back on my email.
(Any suggestions how to improve the code will be appreciated too)
That problem occur sometimes, you can close and run eclipse again it will work (This is in case if the debugging is working well with your phone).
Strange thing happened and the same code is working now. It usually happens right after posting on stackoverflow :)
I installed aLogcat(free)-logcat app, I checked my logs, then they started working in my app too ?!? After uninstalling aLogcat, my app was still working.
My phone has no physical sd card - so this app maybe created image and mounted it somehow.
I'm not sure what exactly happened, maybe this post can help someone with the same problem. Thank you #Chris Stratton and #Bousselham
Related
I've been working with PhoneGap for about two weeks now, yesterday I've build a new android app all went well except that the app starts very slow on my android device. It first shows me for three seconds just a black background except the navbar. So I want to ask how to boost it up or which files I could remove or what I've done wrong please I would be happy if you explain me also the file structure. Thanks in forward for your answers!
Your question is little bit vague. Please, give us more information about your app, about your config and what you’ve already tried.
If my app is slow on any device, I do generally the following:
Check if the same problem occurs in the browser
What’s going on at the start of the app in the browser (Chrome Dev Tools)
If nothing unusual happens, check the logs on the device
For Android, I’m using Logcat for checking what’s happening on the phone.
In order to use Logcat:
1.) Enable debugging mode on your Android phone
2.) You need Android Studio
3.) Connect your phone to your computer and start Logcat in Android Studio 3.1.2
4.) Check the logs while you are starting your app on the phone
I'm using Cloudpebble to develop a watchface for myself. Everything compiles well and I've not had troubles sending the face to my watch until now.
After compiling the watchface and linking to the phone, it returns an error of "Installation failed. Check your phone for details." However, the phone does not shed any light on what these details might be.
I've checked the usual suspects such as full watch slots and inability to connect to phone, but those were not issues in my case and I'm rather stumped as to what the problem might be. Any help would be greatly appreciated.
Pebble App Version:
2.1.0-beta9 2.1 (Android)
Watch Firmware: 2.7 2.8
Watchface Source: GitHub
UPDATE 11/20:
I didn't mention before that the phone app would crash often when attempting to load my watchface on the watch because I chalked it up to beta software. Today brought watch firmware 2.8 and phone app 2.1 proper, and while the phone app no longer crashes, the mysterious error continues without additional information on the phone.
The answer to my particular issue, as it turns out, was that I had unused fonts. It's not a very obvious problem, so I hope this helps others out.
The main issue really was poor error reporting from cloudpebble due to the lack of error clarification returned from the pebble app to cloudpebble.
I have opened an issue on the cloudpebble github (that's where I found the answer) so if any further developments happen, they'll more than likely be there.
I found that the app had to be on a specific page for it to properly install on the pebble. I found this to be true if I installed on the terminal using the Pebble commands or using the web IDE CloudPebble.
The app has to be on the "My Pebble" scene/activity. Make sure when you attempt to install an app to Pebble that you are on that scene/activity regardless if you are installing using the web IDE or the command line.
I was wondering if there is any way to get any feedback of what's going on behind the scenes when running an app on an Android device. If I use the emulator and eclipse I can see what's happening in the logcat. But I'm making a program with ROS android and it I cannot run it on the emulator. Now my program crashes and I don't know why. Is there any way I can get more information?
Thanks
You can use adb to debug the app on your device. See http://developer.android.com/guide/developing/device.html
I can think of a couple (less than elegant) ways to try and find out what's going on.
1) Display toasts from potential problem areas (Does it have a screen?)
2) Write logs to the SD card (does it have an SD card??)
EDIT
I wasn't thinking clearly... you have to be able to load the program to the device, so you must be able to connect it to your PC. So, as Agarwal pointed out, you can most likely hook it up, run it on the device/robot/whatever and see what happens with the logcat.
I am developing an application on android 3.1 Honeycomb. It force-closes on Asus epad.
I don't have an Asus Epad to check why it force-closes, so I want to try it on an Asus epad Emulator. I updated the ADK for eclipse but it doesn't provide an Asus epad Emulator or add-on for it.
In other words, my main problem is that I want to test my application on an Asus emulator.
Does anyone know how I can do this?
Update----
It's showing error on background process & it's a null pointer exception. But now I found another way to do this background code so it must work now.
Thanks for all your comment.
Still if any one find out plugin or package or a way to create emulator which work as Asus Epad.
Thank You.
I am pretty sure that it the app gets force closed on an actual Asus epad, it will get force closed on the emulator too.
You can try to debug your application using LogCat in Eclipse and look the stacktrace to figure out what is going wrong.
Could you post details about what exactly does it crash on? You could monitor the logs in DDMS and check the stacktrace to analyze what exactly is it crashing on.
Unless you post specific details about a problem, there's very little I or anyone else could help you out with.
I use IntelliJ IDEA to write Android apps, and use the DDMS Windows application to view the Android logs (separate from the IDE). It works fine, but after a seemingly random period of time, the logs vanish, except for one line of log, which gets overwritten with incoming logs. I have to shut it down and restart it, which combined with the delays of deploying an app to a device over ADB to debug and test is pretty tiresome.
Is this a known issue with DDMS? Is there anything I can do to make it work consistently without breaking itself?
Are there any other Android log viewing applications for Windows that work better? I'm not very fond of the IntelliJ IDEA one. My favourite is actually CatLog on Android itself, but on a small-screen device it's not a great experience.
It's not about the time, but number of lines being recorded. As Dave C said in the comment, just clear the log and it will be fine
Have you tried looking at "Why doesn't LogCat show anything in my Android?"? The top voted answer may solve your problem