android-logcat

Android logcat “application” column is always empty

本秂侑毒 提交于 2019-12-03 08:26:07
问题 Android logcat "application" column is always empty. I have latest version of android tools. 回答1: I tried all the other suggestions here and none of them worked. For me, the application is shown when running on the emulator, but not on my Galaxy Nexus. It turns out I needed to add android:debuggable="true" to <application> in my AndroiManifest.xml . See http://developer.android.com/guide/topics/manifest/application-element.html. People who use Eclipse don't see this problem because apparently

Time displayed in Logcat

限于喜欢 提交于 2019-12-03 08:08:04
问题 I need to get the Android device timestamp in the format hh:mm:ss:SS. I am able to view the time displayed in the Logcat of Eclipse. Is it the computer's time or is it the Android device's time? 回答1: If you are running your app on Android device then it will print device's time, if on emulator then it will show computer's time. To be ensure just match the Log's time with device's time and with computer's time you will find your answer.. 回答2: From the docs of logcat you can see that there is

Is there an easy way to “deactivate logging” prior to releasing your app on the market?

笑着哭i 提交于 2019-12-03 07:29:26
I'm preparing to release an app on the market place, on reading the Google documentation located here it suggests the following : Deactivate any calls to Log methods in the source code. Is there an easier way than having to go through all my source files and remove each line manually? Also, why remove the logging, is it a resource hog? Janusz You can do this through proguard . In the latest SDK and tools a proguard configuration file should already exist. Christopher answered this in a similar question . The easiest way is probably to run your compiled JAR through ProGuard before deployment,

Automatically clearing LogCat on each Eclipse Debug/Run?

馋奶兔 提交于 2019-12-03 07:27:37
问题 I expected this to be a simple task, but I'm surprised to find no answers for this. Let me clarify: I do not want to call adb logcat -c manually. In fact, I'm not even using the command line to view LogCat, so I don't think this is possible (edit: actually, it is, by running the command in a separate command line...but I don't want to do that) . I'm using Eclipse to view LogCat. I do not want to click button Clear Log each time. That's what I'm doing now. I do , programatically or through

Why do I see “No Debuggable Applications” in Android Studio Logcat while my application is running?

北慕城南 提交于 2019-12-03 06:30:57
问题 I wanted to filter what is shown in the Android Studio Logcat to show what is relevant to my application only. I have chosen Show only selected applications from the drop down at the top of the logcat as shown in the following screenshot: But in the drop down menu above it which is supposed to show running application(s) (and other options) from which we can choose our application to see Log messages related to it only, I see No debuggable Applications as the only option. Why? WHat should I

Remove time, date, and package name from System.out.print in Android Studio logcat

偶尔善良 提交于 2019-12-03 05:58:13
I want to remove the following sort of text "06-11 14:36:59.814 3951-4564/example.myapplication I/System.out﹕" from my system.out.prints in my app. How can I accomplish this?? I am using android studio Android Studio 2.2 Not sure which version made this available but 2.2 has it... Just found this myself. So happy. 来源: https://stackoverflow.com/questions/37767350/remove-time-date-and-package-name-from-system-out-print-in-android-studio-logc

How can I stop the LogCat output from scrolling automatically in Eclipse?

六月ゝ 毕业季﹏ 提交于 2019-12-03 05:25:48
问题 UPDATE: This turned out to be a bug in R14 of the SDK tools. It has been fixed in R15 which was released on Oct/27/2013. Updating to the latest release solves the problem as suggested in the accepted answer. I use the LogCat window in the Debug view in Eclipse to diagnose and fix crashes in my code. I've noticed that the LogCat output will automatically scroll down anytime new lines are added (but only after you scroll to the bottom yourself). This is great if I'm waiting for an exception

What are “tag” and “id” on Layouts?

北城以北 提交于 2019-12-03 05:03:38
I know how the switch statement works but I don't know what this means (R.id.webbutton). Can anyone please explain what it is and also what is TAG? Is there any guide for the beginners? I mean absolute beginners. Id is id of your xml's components [may be views like textview,edittext... or viewgroup like linearlayout ,relativelayout... or anything else] in xml simply you can get reference to them in java code by saying (R.id."id of your view in xml") but firstly you should use setContentView(R.layout."name of xml file in layout/res in your project") this xml file which you want to use it's

How to debug BOOT_COMPLETE broadcast receiver's “Force Close” crashes?

自作多情 提交于 2019-12-03 02:27:05
问题 Since the phone restarts and thus gets disconnected from the Eclipse debugger/LogCat while it's booting up, how do I see where my boot complete broadcast receiver is crashing? I am performing some actions in the onReceive() of my public class BootCompleteReceiver extends BroadcastReceiver { ... } This is crashing and popping up a force close dialog when the phone boots. How do I debug this and see where the problem is? The question holds true for debugging any BOOT_COMPLETE broadcast

Android display Logcat in TextView

佐手、 提交于 2019-12-03 01:13:53
The app I'm building have root-access to Android. I wish to show Logcat log information in one of the TextView so it can show up on the screen while i'm debugging. Can someone give me some ideas which library/function i can call to access those log? Thanks Dawid Czerwinski Here's a blogpost that does exactly what you need it to do. It has a complete code example on how to display the contents of the Logcat log. Here's the code: import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import android.app.Activity; import android.os.Bundle; import android