android-logcat

Log not working (or seems to drop some lines)

给你一囗甜甜゛ 提交于 2020-01-05 04:27:05
问题 EDIT: A more honed version of this question, with a good answer, is at: Rather odd behaviour of Log EDIT: The (bizarre) solution is reported as an answer below. I have a service as part of an application which is running reasonably well, although there is an unusual bit of behaviour which I am trying to understand. To do this, I have been putting Log.d statement in various methods in classes to report state information at various points. All of these seem to be working (ie reporting the

Interpret Logcat entry: threadid=8: still suspended after undo (sc=1 dc=1 s=Y)

孤者浪人 提交于 2020-01-02 03:44:06
问题 I am running around ten AsyncTasks after my application starts. Sometimes the emulator takes a long time to start these tasks. When this occurs, I see the following message in the log cat: D/dalvikvm(1983): threadid=8: still suspended after undo (sc=1 dc=1 s=Y) When the emulator executes quickly this message doesn't appear. Strangely, this behavior changed today without any modifications. Since I have explicitly assigned 512mb ram to the emulator, it is no longer extremely slow ~5min, now ~5s

Taking logcat and kernel logs simultaneously

折月煮酒 提交于 2020-01-01 17:07:10
问题 I am trying to take logs (logcat and kmsg) via the following command "logcat -v time -f /dev/kmsg | cat /proc/" However I am not sure, where the log file is stored, and what will be its name. How do I identify it 回答1: OK, here are the results of a quick Google search: Android Logging System How to get kernel messages from Android? What I got from those links are: The last part of your command should actually be cat /proc/kmsg logcat -v time -f /dev/kmsg writes logcat outputs to kernel message

How to write log to sd card in Android? [duplicate]

无人久伴 提交于 2020-01-01 12:08:20
问题 This question already has answers here : How do I write the exception from printStackTrace() into a text file in Java? (5 answers) Closed 5 years ago . My program is crashing in device. I want to exactly catch the log of my program while running in my device .i.e I want to write the log to my sd card, up to the point of crashing. How can I achieve this? 回答1: Try this Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(this)); // add this to your activity page public class

Log cat in android

被刻印的时光 ゝ 提交于 2019-12-31 05:32:09
问题 I am a new android developer so I don't know how to use logcat. So kindly request that if you know then guide me. 回答1: Connect your device, open a console window in the tools directory of your android sdk installation and run adb logcat Or start an emulator and do the same. If there's more than one device connected you needed to pass the "-s" parameter specifying the devices. get them using adb devices 回答2: if you are using eclipse IDE for development, you need to go to WINDOW->Show View-

INSTALL_FAILED_DEXOPT error when trying to install application

大城市里の小女人 提交于 2019-12-28 05:58:15
问题 I have a similar problem to the ones listed here and here. I am getting an INSTALL_FAILED_DEXOPT error every time I try to install my app on my Motorola Xoom. Here is the error message from the console: [2011-08-02 09:34:43 - Blade] Installation error: INSTALL_FAILED_DEXOPT [2011-08-02 09:34:43 - Blade] Please check logcat output for more details. [2011-08-02 09:34:43 - Blade] Launch canceled! And here is the corresponding logcat: 08-02 09:47:48.910: ERROR/PackageManager(142): Package com

how can i access logcat file on device

孤者浪人 提交于 2019-12-28 04:23:12
问题 How can I access and read the logcat file (at "/system/bin/logcat") from the device, using my application. My phone is not rooted. Do I need a super user permission? 回答1: you can read through this code from your application ArrayList<String> commandLine = new ArrayList<String>(); commandLine.add("logcat"); //$NON-NLS-1$ commandLine.add("-d"); //$NON-NLS-1$ ArrayList<String> arguments = ((params != null) && (params.length > 0)) ? params[0] : null; if (null != arguments) { commandLine.addAll

Filter LogCat to get only the messages from My Application in Android?

守給你的承諾、 提交于 2019-12-25 08:37:08
问题 I observed that when i use Logcat with Eclipse with ADT for Android, I get messages from many other applications as well. Is there a way to filter this and show only messages from my own application only. 回答1: Package names are guaranteed to be unique so you can use the Log function with the tag as your package name and then filter by package name : NOTE: As of Build Tools 21.0.3 this will no longer work as TAGS are restricted to 23 characters or less. Log.<log level>("<your package name>",

LogCat won't show my logs

て烟熏妆下的殇ゞ 提交于 2019-12-24 13:08:06
问题 I've searched for similar problems, but I didn't find anything useful - I'm working with eclipse , and I can't see my Logs. The device is connected properly, the app runs and does what it's supposed to do, but I get no logs from it. I get other logs messages from the device, not the ones that I print, e.g. Log.d("SMS", "hello") . On the other hand, if I use the statement System.out.println("hello") , I do see it, tagged as System.out . I've tried to disconnect and reconnect the device,

Logcat messages not shown with Xperia XA1 ultra

爱⌒轻易说出口 提交于 2019-12-24 10:35:24
问题 Hi when I debug my apps with Sony Xperia XA1 Ultra in android studio, debug and verbose logs do not appear. My phone is running Android 8.0. I have installed the necessary driver and have tested with another phone (Sony Xperia Z1 Compact) and it outputs the logcat messages. Anybody else with the same issue? 回答1: Log.d messages are ignored in some models. You can use Log.i to solve the problem. To replace in all of your project files, you can follow: Find and replace Android studio 来源: https:/