logcat

Eclipse logcat debugging

风流意气都作罢 提交于 2019-11-26 08:38:10
问题 I have a beginner question, I want to debug my app and i don\'t know how to use the Logcat properly. Right now, I am getting this error and i don\'t know what it means. How can i use this information? Is there a tutorial somewhere i can watch? Thanks for your help. 09-23 11:27:55.968: E/AndroidRuntime(807): FATAL EXCEPTION: main 09-23 11:27:55.968: E/AndroidRuntime(807): java.lang.NullPointerException 09-23 11:27:55.968: E/AndroidRuntime(807): at com.uniqueapps.runner.Start.onClick(Start.java

How do I write outputs to the Log in Android?

和自甴很熟 提交于 2019-11-26 07:23:20
问题 I want to write some debugging output to the log to review it with logcat. If I write something to System.out this is already displayed in logcat. What is the clean way to write to the log and add levels and tags to my output? 回答1: Look into android.util.Log. It lets you write to the log with various log levels, and you can specify different tags to group the output. For example Log.w("myApp", "no network"); will output a warning with the tag myApp and the message no network. 回答2: The Tag is

How to exclude certain messages by TAG name using Android adb logcat?

送分小仙女□ 提交于 2019-11-26 06:54:47
问题 Logcat allows filtering logs but it works like that: You define filters and logcat only displays messages which matches filters. But is there a way to display all logs EXCEPT some TAGs defined by filters? 回答1: If you are using adb logcat you could pipe it through grep and use it's inverted matching: From the grep manpage: v, --invert-match Invert the sense of matching, to select non-matching lines. For example: $adb logcat | grep --invert-match 'notshownmatchpattern' You can extend this by

Why MediaPlayer throws NOT present error when creating instance of it?

二次信任 提交于 2019-11-26 05:29:52
问题 When creating an instance of MediaPlayer LogCat shows this error: QCMediaPlayer mediaplayer NOT present Why is that and is it normal? Sample: package com.example.testapp; import android.app.Activity; import android.media.MediaPlayer; import android.os.Bundle; public class MainActivity extends Activity{ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); MediaPlayer mediaPlayer = new MediaPlayer(); } } 回答1: It means your platform does not support

Android Log.v(), Log.d(), Log.i(), Log.w(), Log.e() - When to use each one?

主宰稳场 提交于 2019-11-26 04:03:27
问题 The different LogCat methods are: Log.v(); // Verbose Log.d(); // Debug Log.i(); // Info Log.w(); // Warning Log.e(); // Error What are the appropriate situations to use each type of Logging? I know that perhaps it\'s just a little bit of semantics and perhaps it doesn\'t really matter, but for LogCat filtering in Android Studio and Eclipse, it would be nice to know I am using the proper methods at the appropriate times. 回答1: Let's go in reverse order: Log.e: This is for when bad stuff

Android emulator spams logcat with "Service com.android.exchange.ExchangeService has leaked ServiceConnection … that was originally bound here

不羁岁月 提交于 2019-11-26 03:39:56
问题 I am working on a very simple application in Android. I made a splash screen, main menu and a page with radio buttons and a button (which plays a sound depending on a radiobutton checked). The application works fine (doesn\'t crash) but I\'m getting all these errors all the time in logcat (I run application with emulator). What could that be? How could I fix it? Should I be worried? I will post codes additionally when someone asks because I don\'t know where could the problem be and I don\'t

How to interpret Logcat

一世执手 提交于 2019-11-26 03:28:47
问题 Can anyone tell me how I should read the errors in Logcat? I\'d like to understand where my problem is. At the moment, I tried to read it but can\'t find the cause of the crash. Here\'s the Logcat I don\'t understand: 05-18 18:29:44.160: ERROR/AndroidRuntime(2145): FATAL EXCEPTION: main 05-18 18:29:44.160: ERROR/AndroidRuntime(2145): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.paad.whereami/com.paad.whereami.WhereAmI}: java.lang.NullPointerException 05-18 18:29:44

Android studio logcat nothing to show

拥有回忆 提交于 2019-11-26 02:42:21
问题 I installed Android Studio yesterday, and I tried to use the LogCat to see the logs. But there is nothing to show in the logcat. I used the terminal to run ./adb logcat and it works. Is there someone who can explain to me how to use logcat in Android Studio? 回答1: Restarting logcat helps me always. 回答2: I get into this state often. Logcat is blank. Debugging works, I can hit breakpoints. No filters are set. Log level is on Verbose. I fix it by repeatedly looping through the following: Restart

Why doesn't logcat show anything in my Android?

好久不见. 提交于 2019-11-26 02:41:29
问题 Why doesn\'t logcat show anything in my Android (while developing apps with Eclipse)? It just doesn\'t print anything. It\'s empty. 回答1: Maybe you have Mylyn installed? http://code.google.com/p/android/issues/detail?id=1808 回答2: I had this same issue but my fix was much more basic: If the LogCat panel is empty in Eclipse the emulator doesn't have the focus. Go to the DDMS perspective and try clicking on the 'emulator' entry in the Devices panel (top-left screen). 回答3: Dial *#*#2846579#*#* and

Huawei, logcat not showing the log for my app?

拜拜、爱过 提交于 2019-11-26 02:04:18
问题 OK, logcat is showing system logs but it is not showing application log on my Huawei Ascend. If I switch to another device such as my Galaxy Nexus or Nexus 7 then for the same app (same APK even) log is displayed. The Huawei Ascend is running Android 4.1.1, it has USB debugging switched on in developer options. This occurs for logcat run from either the command line or from IntelliJ. And I\'m making sure that the correct device is selected - in fact I\'m only plugging a single device in at a